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
Ket [755]
3 years ago
14

g Write a program using integers usernum and x as input, and output usernum divided by x four times. For example, if the input i

s: 2000 2 where user_num = 2000 and x = 2, then the output must be: 1000 500 250 125 Note: all the values must be printed on the same line. Also, recall that in Python 3, integer division discards fractions. Ex: 6 // 4 is 1 (the 0.5 is discarded).
Computers and Technology
1 answer:
Tresset [83]3 years ago
4 0

Answer:

The python program to this question as follows:

Program:

usernum= 2000  #define variable usernum and assign value

x=2   #define variable x and assign value

result = ''  #define variable result

for i in range(4):  #loop for calculate value

   usernum =usernum//x  #divide value

   result += (' '+str(usernum))   #collect value

print(result) #print value

Output:

1000 500 250 125

Explanation:

In the above python program code firstly, two integer variable is defined that is "usernum and x" in which variable usernum holds a value that is "2000" and variable x holds a value that is "2", and a string variable result has defined, that store the calculated values.

  • In the next step, a for loop is declare that runs four times, in which the usernum variable divides its value by variable x and stores all the values in string variable result.
  • In the last print, function is used to print result variable value.
You might be interested in
Lol WAKE UP!!! and get ready to answer my questions.
deff fn [24]

Answer:

<h2>1. Variable Creation Statement</h2><h2>2. Fav_Num=7</h2>

Explanation:

<h2><em>Hope This Helps :)</em></h2><h2>Im not sure if the 2nd one is correct but i think that it is.</h2>
5 0
3 years ago
click the view lab button. restart the computer and press the f2 or delete key on your keyboard to enter the bios setup program.
IgorLugansk [536]

The brand of processor that is known to be installed are:

  • Intel
  • 4096
  • 1610
  • -3
  • Enabled
  • -Diskette Drive

<h3>What a processor means?</h3>

A processor (CPU) is known to be a kind of logic circuitry that  is known to answer to and work on the basic instructions that tends to drive a computer.

Note that the CPU is seen as the key  and most crucial integrated circuitry (IC) chip and the intel process is known to be one of the most common forms of processor.

Therefore, The brand of processor that is known to be installed are:

  • Intel
  • 4096
  • 1610
  • -3
  • Enabled
  • -Diskette Drive

Learn more about bios settings from

brainly.com/question/13103092

#SPJ1

Click the View Lab button. When the simulated computer starts, press the F2 or Delete key on your keyboard to enter the BIOS setup program. Explore the current BIOS settings to find the answers to the following questions.

What brand of processor is installed?

4 0
1 year ago
A ______ object is used for displaying the results of a question based on stored data.
Sphinxa [80]
The answer would be C
3 0
3 years ago
Read 2 more answers
Given a constant named size with a value of 5, which statement can you use to define and initialize an array of doubles named ga
Vinil7 [7]

Answer:

all of the above

7 0
3 years ago
How big is an iphone xr
Eddi Din [679]

Answer:

the iPhone xr display measure in at 6 .1 inches

8 0
3 years ago
Read 2 more answers
Other questions:
  • Course hero 21. say you have a /15 network address. you are asked to create subnets with at least 1,000 hosts/ subnet. what is t
    9·1 answer
  • What command will disable dns lookup to prevent the router from attempting to translate incorrectly entered commands as though t
    6·1 answer
  • Which error produces incorrect results but does not prevent the program from running?
    7·1 answer
  • Differences between Quality of Services and a Service of Quality approach
    9·1 answer
  • Discuss the role that Cloud Computing plays in an organization and the potential impact that Cloud Computing has on IT.
    8·1 answer
  • What is a router?
    9·1 answer
  • A carver begins work on the following block of granite that weighs 2700 g. What is the density of the granite?
    13·1 answer
  • Q.2 (A)
    5·1 answer
  • Free points <br><br><br><br><br> also if u wanna check out my spotlfy u can (xkuromist)
    6·2 answers
  • Write a C++ program to print name, age, class, school​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!