Inactive Tutor answered 02/13/21
userNum = input(" Input userNum :>")
x=0
while (x==0):
x = input("input x :>")
outbuff = " "
for I in range(4):
userNum = int(userNum) // int(x)
outbuff = outbuff + str(userNum) + " "
print(outbuff)
Jeremy U.
asked 02/13/21Write a program using integers userNum and x as input, and output userNum divided by x four times.
Ex: If the input is:
Then the output is:
Note: In Python 3, integer division discards fractions. Ex: 6 // 4 is 1 (the 0.5 is discarded).
Inactive Tutor answered 02/13/21
userNum = input(" Input userNum :>")
x=0
while (x==0):
x = input("input x :>")
outbuff = " "
for I in range(4):
userNum = int(userNum) // int(x)
outbuff = outbuff + str(userNum) + " "
print(outbuff)
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.