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

Which verb agrees with its subject? Many passengers who ride on the bus __________ to music through headphones. A. listening B. listen C. was listening D. liste
seven times the quotient of five and seven
10% of what number is 30
how do you put this .689 in word form
how did the city of Curitiba address the problem of rapid population growth
how do you put this .689 in word form
Need help! Why might Brazil have so strongly stressed the growing of coffee in the early 20th century? Brazilian citizens drank more coffee than any other count
Choose the sentence with no errors in punctuation or capitalization. (Points : 1) She continued, "The last story on the reading list is "The Mos
How much should a female 5'2 weigh?
Members of which of the following phyla have the most species that parasitize humans? a.Porifera b.Mollusca c.Echinodermata d.Platyhelminthes