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
NeTakaya
3 years ago
12

Developed by Frank Vahid. Write a program using integers usernum and x as input, and output usernum divided by x four times. For

example, if the input is: 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:
OleMash [197]3 years ago
7 0

Answer:

Explanation:

Let's do this in Python. We will loop through 4 times, each of the loop would compute the dividend, store it as string in a result variable and finally print the result on the same line:

def divide_4_times(user_num, x):

    result = ''

    for i in range(4):

         user_num /= x

         result += (' ' + str(user_num))

   print(result)

You might be interested in
What type of program is Microsoft® Excel®?
8090 [49]

Answer:

the answer is spreadsheet application. I hope it helps

7 0
2 years ago
Read 2 more answers
Timing can be a major factor in the success of a business incorporation and emerging technology. Describe one potential problem
Serga [27]
The price could go up, it might not work then later down the road
5 0
3 years ago
Read 2 more answers
Which of the following describes the term "false information?"
pav-90 [236]
Inaccurate and misleading
3 0
3 years ago
Leo needs to consolidate data in multiple worksheets by performing a calculation across all worksheets on the same cells.
wolverine [178]
A do you think is the answer
4 0
2 years ago
Read 2 more answers
Que se trata el RUC<br>​
mariarad [96]
No se senor i no sure
7 0
2 years ago
Other questions:
  • Do you believe that OOP should be phased out and we should start working on some alternative
    6·1 answer
  • Examine the evolution of the World Wide Web (WWW) in terms of the need for a general-purpose markup language. Provide your persp
    5·1 answer
  • What does "FDDI" stand for in Technology?
    5·2 answers
  • In the cases of int, byte, long, short (In Java) Can you give the heirachy in ascending order?​
    6·1 answer
  • Someone once observed that "the difference between roles and groups is that a user can shift into and out of roles, whereas that
    13·1 answer
  • Create an array named itemDescription containing the following item descriptions:
    15·1 answer
  • This project involves writing a program that encodes and decodes messages. The program should prompt the user to select whether
    15·1 answer
  • ______ is the ability of a system to do more than one thing at a time. A. Multibusing c. online processing b. Multiprocessing d.
    13·1 answer
  • What is an orthochromatic film?
    12·1 answer
  • True or False(T or F): Point-and-shoot cameras have only 1 lens. *
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!