ghjklytfdvnfc9204 ghjklytfdvnfc9204
  • 14-01-2021
  • Computers and Technology
contestada

create a function that draws a certain number of spaces, followed by a certain number of stars, followed by a newline.

Respuesta :

sandlee09
sandlee09 sandlee09
  • 15-01-2021

Answer:

Explanation:

The following code is written in Python and creates a function called create_sentence which takes in 2 parameters which are the number of spaces and the number of stars. Then it uses these values to create the sentence and return it.

def create_sentence(spaces, stars):

   sentence = ""

   for x in range(spaces):

       sentence += " "

   for x in range(stars):

       sentence += "★"

   sentence += "\n"

   return sentence

Answer Link

Otras preguntas

What does the drop in barometric pressure from 1003 millibars to 926 millibars tell  you about a hurricane?
What is (-4.8y + 20.1) - (12.7y + 9.3)?
What does the drop in barometric pressure from 1003 millibars to 926 millibars tell  you about a hurricane?
how did english culture influence chaucer?
The receptive surface for pollen on an angiosperm flower is the (A) anther (B) corolla (C) ovary (D) style (E) stigma
peter made two transactions today at his bank. what can the sum -47.27 plus 598= 550.73  mean in terms of peters bank account? i need help!!
contains elements in the solid, liquid, and gas phase a. alkali metals b. alkaline earth metals c. transition metals d. halogens e. noble or inert gases
what is 2.1 rounded to the nearest tenth?
why do ecologist make models?
how do you solve the system of elimination method.x-6y=-30-2x-5y=-25