
Patrick B. answered 11/02/20
Math and computer tutor/teacher
print("Hello World")
user_num = input('Input the # :>')
x=-1
while int(x) <= 0:
x= input(' input x :>')
for iLoop in range(3):
user_num = int(user_num)/int(x)
print(user_num)
Annie W.
asked 11/01/20Write a program using integers user_num and x as input, and output user_num divided by x three 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).
Patrick B. answered 11/02/20
Math and computer tutor/teacher
print("Hello World")
user_num = input('Input the # :>')
x=-1
while int(x) <= 0:
x= input(' input x :>')
for iLoop in range(3):
user_num = int(user_num)/int(x)
print(user_num)
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.