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

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

Computers and Technology ##
Comments (7) on “Write a program using integers user_num and x as input, and output user_num divided by x three times.”

### Leave a Reply Cancel reply

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

user_num = 2000

x = 2

for i in range(3):

user_num = user_num // x

print(user_num)

Soory! I can't tell please tell clearly

The program written in Python is as follows:

user_num = int(input("Number: "))

x = int(input("x: "))

for i in range(1,4):

user_num = user_num/x

print(user_num," ")

Explanation:

This line gets user_input from the user

user_num = int(input("Number: "))

This line gets x from the user

x = int(input("x: "))

This line iterates from 1 to 3

for i in range(1,4):

This line divides user_num by x

user_num = user_num/x

This line prints the result of the division

print(user_num," ")

user_num = int(input("Number: "))

x = int(input("x: "))

for i in range(1,4):

user_num = user_num/x

print(user_num," ")

Explanation:

LAB: Divide by x

0 / 10

Explanation:

40 outputs would be counted

The slope formula is delta y/delta x=m

You can choose any two points. Let's choose (0,25) and (1,30)

30-25/1-0=5/1=5

Slope intercept form is y=mx+b

b=the y intercept

y=5x+25 since (0,25) is the coordinates for the y inthercept.

Plug in 200: y=5(200)+25

Simplify and you get that y=1025

Your answer is 1025

Your welcome