Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+3 votes

This is again for the quiz... How do I turn an input number into an integer so I can have the text repeat however many times the number is?

asked in CSC201 Spring 2021 by (8 points)

2 Answers

+5 votes
Best answer

Use this form:
variable = int(input('Words to prompt the user for a value'))
Ex: number = int(input('How many times to repeat?'))

Also, I remember Prof did explain this issue in the lecture presentation ( Check it if needed on pg.17):

Hope this helps!

answered by (8 points)
selected by
+2 votes

I did for I in range (int(whatever the previous input is))

answered by (8 points)