I cannot figure out in Python where to put \n to get a return after my final output here is the question: Write a program using integers user_num and x as input, and output user_num divided by x three...


I cannot figure out in Python where to put \n to get a return after my final output here is the question:


Write a program using integers user_num and x as input, and output user_num divided by x three times.


Ex: If the input is:


2000 2


Then the output is:


1000 500 250


The code I have so far is:


user_num = int(input())
x = int(input())


for i in range(3):
user_num = (user_num // x)
print(user_num, "", end = "")


I get the correct output just with a space at the end of the last output instead of a return.



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here