1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IrinaK [193]
3 years ago
6

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:20002Th

en the output is:1000 500 250Note: In Python 3, integer division discards fractions. Ex: 6 // 4 is 1 (the 0.5 is discarded).LAB ACTIVITY2.29.1: LAB: Divide by x0 / 10main.pyLoad default template...12''' Type your code here. '''
Computers and Technology
1 answer:
HACTEHA [7]3 years ago
5 0

Answer:

Following are the code to the given question:

user_num = int(input())#defining a variable user_num that takes input from user-end

x = int(input())#defining a variable x that takes input from user-end

for j in range(3):#defining for loop that divides the value three times

   user_num = user_num // x#dividing the value and store integer part

   print(user_num)#print value

Output:

2000

2

1000

500

250

Explanation:

In the above-given program code two-variable "user_num and x" is declared that inputs the value from the user-end and define a for loop that uses the "j" variable with the range method.

In the loop, it divides the "user_num" value with the "x" value and holds the integer part in the "user_num" variable, and prints its value.  

You might be interested in
18. What do we call the Microsoft Word File?
Colt1911 [192]

Answer:

<h2>we call Microsoft Word File "<u>document</u>" or "<u>docx</u>"</h2>
5 0
2 years ago
Mad libs are activities that have a person provide various words, which are then used to complete a short story in unexpected(an
Vsevolod [243]

did you just put random a*s word together and expect us to know the ¨answer¨

5 0
3 years ago
Examples of hybrid computer​
Inga [223]

example, the Speedometer of a car measures the speed, changes in temperature in the body with a thermometer’s help, and weighs our body with a weighing machine.

6 0
3 years ago
Read 2 more answers
If known vulnerabilities in software are entry points for an attacker, why are the software vulnerabilities not corrected before
Evgesh-ka [11]

Answer:

we dont knoqw

Explanation:

7 0
2 years ago
1.is there a digital way to mark your favorite website in the internet?Expound your thoughts.
charle [14.2K]

Yes, there is a way to mark your favourite website on the internet by adding it to bookmark

Explanation:

No, I didn't find it difficult to create a bookmark.

It was easy you just have to click on the bookmark button

5 0
3 years ago
Other questions:
  • Which of the following has likely attended vocational school?
    10·1 answer
  • You arrive to an intersection with traffic
    12·1 answer
  • Suppose the work required to stretch a spring from 1.1m beyond its natural length to a meters beyond its natural length is 5 J,
    14·1 answer
  • Networking device converts analog signals to digital ones?
    8·1 answer
  • Which fund classification would a focus on only stocks of technology companies match?
    10·1 answer
  • Why must a satellite have distinct uplink and downlink frequencies.​
    6·1 answer
  • Which results are expected in a personality test but not a skills assessment?
    13·1 answer
  • Tools used to type text on Ms -paint​
    10·1 answer
  • Can someone help me please ??
    12·1 answer
  • Fast i need now ill give anything
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!