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]
2 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]2 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
Whose massively popular photo led to the creation of google images?
Alex
Jennifer Lopez’s picture led to the creation of google images.
5 0
3 years ago
Who developed the idea of a universal network?
polet [3.4K]
Alan Turing fathered the machines we now lovingly call computers, however it was Nicola Tesla that birthed the idea of a world-wide wireless system.
7 0
3 years ago
What will the following loop display? 0 1 2 3 4 5 0 1 2 3 4 0 1 2 3 4 The loop will display numbers starting at 0, for infinity.
Sidana [21]

Answer:

muestra números que comienzan en 0

Explanation:

7 0
3 years ago
Determining Correct Date Function What function text would you use to put today's date and time in a cell? 0 =TODAYO =NOWO O NOW
Murrr4er [49]

Current date formula:

=TODAY()

Current time formula:

=NOW()

As you can see, the =TODAY() formula only includes the day, month and year. The =NOW() function displays more information, showing the day, month, year, hour and minutes (using a 24-hour clock)

if useful mark as brainliest

3 0
3 years ago
I can't find my grandson someone help
Artemon [7]

Answer:

i'm right here

Explanation:

grandma

8 0
2 years ago
Read 2 more answers
Other questions:
  • Which cell formatting is most likely to use $?
    11·2 answers
  • Write a program to input money in cents from user, example 12745 and display the one dollar bills and the cents. Submit source c
    12·1 answer
  • Which technology forms the foundation for cloud computing? forms the foundation for cloud computing.
    12·2 answers
  • How to fix dark images?<br><br>I am using a phone btw​
    14·2 answers
  • Waygate's residential Internet modem works well but is sensitive to power-line fluctuations. On average, this product hangs up a
    6·1 answer
  • Complete the sentence with the correct response.
    9·1 answer
  • What are some limitations when it comes to testing and ensuring program quality? List at
    15·1 answer
  • Which of the following tips for using social network will help you keep your job
    12·1 answer
  • Connect research concepts to their definitions
    13·1 answer
  • A system engineer enhances the security of a network by adding firewalls to both the external network and the internal company n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!