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
Why it is important for everyday people to have access to credible online information?
Citrus2011 [14]

Answer:

so you know what is true

Explanation:

5 0
4 years ago
Read 2 more answers
project-1 Write a class called Person that has two data members - the person's name and age. It should have an init method that
MArishka [77]
Hello how are you today
4 0
3 years ago
Trent is a skilled sketch artist who wants to create images for his online portfolio. He is even
Sidana [21]

Answer: A digital tablet

Explanation: a scanner wouldnt show how to draw, a stock image would just show an image, phtot editing is to edit a picture took like to change the light. The answer is Digital tablet because you can draw on it while recording.

8 0
3 years ago
AND, NOT and OR are comparisons of values included in which type of operation?
Allushta [10]

Answer:

Comparison Operators

Explanation:

6 0
2 years ago
Read 2 more answers
The most popular activities carried out on smartphones is _________. A.Texting B.Watching movies C.E-mailing D.Gaming
Soloha48 [4]

Yes the ansewer is c bc you can look it up!


4 0
3 years ago
Read 2 more answers
Other questions:
  • To collect data using Google Analytics, which steps must be completed? (select all answers that apply)
    9·1 answer
  • An intranet that is partially accessible to authorized people outside the business or organization is known as an
    7·2 answers
  • True or False. Students taking courses log into Blackboard with their "key account" username and password.
    8·1 answer
  • Your program is going to compare the scores of two volleyball teams that play each other. To win a match in volleyball, a team m
    14·1 answer
  • If you receive an email message you suspect is spam, what should you do?
    11·1 answer
  • A location in space is called?
    6·2 answers
  • Premise: Tracy has a file that contains a list of actors and the movies in which they acted. She wants to know the top 3 ranked
    8·1 answer
  • (in order of a-z)
    12·1 answer
  • Whats th diffence between a fwireless speaker and a wird speakr
    12·1 answer
  • 12. Fill in the blanks: In a ____________, the root of the tree is labeled _______________, children of the root are the names o
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!