7.5k views
3 votes
Fix the following Python code that reads an integer from the user and prints out 5 times that number.

User Iam
by
7.0k points

1 Answer

3 votes

Answer:

Check code down below.

Step-by-step explanation:

I'm unsure of your python code, but I can give you an example code that you may apply to your code:

number = "5" #(I set this to a string)

print(number*5) #(This will print out whatever is in your string 5 times)

So your outcome will be: 55555

UNLESS, you are looking for multiplication, such as 5 * 5 = 25

Then, you can do this:

number = 5

print(number*5)

This will be 25.

User THK
by
7.8k points