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

the temperature of a pot of water fell from 72°F to 36°F in 4 minutes. find the average temperature per minute
In French, our teacher has asked us to write a piece of writing where we sell our sibling on eBay. We have to describe them, and I can't figure it out?! Please
Solve 24 over 17 = m over 34 What is "m"??
Are these sentences time, sequence, condition, or state? We will have completed a full week's worth of work in the forest. We will be flying to a remote part of
What is 0.03703704 as a fraction
How do you show your work for 0.054 divided by 0.72
In which phase of the cell cycle do cells grow and synthesize new proteins and organelles
a snowbarder decends a 12000-ft hill in 3min. hat is the mean change in evlevation per min.
Does any body know 2v+7=3
The Neolithic Revolution refers to the time when early humans were beginning to do what?