0

How to make a python code that will ask user the number of printing word "eggs"and then print the word "eggs" as much times?

How to make a python code that will ask user the number of times that user wants to print word "eggs"and then print the word "eggs" as much times as the number inserted?thank you

16th Dec 2016, 3:23 AM
Timo
Timo - avatar
3 Answers
+ 3
n=int(input("enter no. of times::")) print ("eggs"*n)
16th Dec 2016, 4:45 AM
nitesh
+ 2
Get input. Use a for loop to iterate between 0 and the input and print eggs each time.
16th Dec 2016, 3:32 AM
Ben
Ben - avatar
+ 2
for i in range(int(input()): print("eggs")
16th Dec 2016, 7:27 AM
Antek
Antek - avatar