dillonseanbarr dillonseanbarr
  • 23-10-2020
  • Computers and Technology
contestada

Does anyone know how to ask the user to input their name and then print the name 10 times using a while loop and have the 10 names on different lines?

Respuesta :

Cytokine
Cytokine Cytokine
  • 23-10-2020

In python:

name = input("What's your name? ")

i = 0

while i <= 10:

   print (name)

   i += 1

I hope this helps!

Answer Link

Otras preguntas

Name the compound formed when a copper cation has a 2+ charge combined with a bromine anion that has a 1- charge.
Drip - hiss - drip - hiss fall the raindrops / On the Oaken log which burns, and steams, and smokes the ceiling beams. / Drip - hiss - the rain never stops.
A dice is rolled 4 times. What is the probability of showing a 5 on every roll? (Round to 4 decimal places)
PLEASE HELP ASAP!! Match the names of each state with the correct letter on the map. a. b. C. d. e. f. g. h. i. j. k. l. m.
Simplify 3{[3(9-2)]+[7(8-1)]}​
The formula y = mx + b is called the slope-intercept form of a line. Solve this formula for the slope m.
How many zeros are in the standard form of 107? Write this number in standard form.​
Find the midpoint of the segment with endpoints:(-7,-8) and (4,7). (-5.5,-7.5) (-3,-1) (-5.5,-1.5) (-1.5,-0.5)
What is the mean of 7, 5, 10, and 2?
Jim, the radiology department director, believes the annual operating budgeting process is a tool used to increase his department through the addition of staff