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
A(n) ____ backup only archives the files that have been modified since the last backup.
NemiM [27]

The answer is incremental backup as this is the one responsible of having to provide a backup with files that are modified since the last backup it has received, it is considered to be a backup in which is a type of security copy.

3 0
3 years ago
CS902 Module3 Homework1
egoroff_w [7]
That’s a Great question
3 0
2 years ago
What role does javascript play in a web page
luda_lava [24]

Answer:

Js is an programming language usually used for coding. It is used on most browsers to produce an effective and interactive design for some users.

6 0
2 years ago
What is the purpose of the literature review section of research paper
navik [9.2K]

variation of colored sediment

5 0
3 years ago
Starting in 2024 under a new law, all new smartphones sold in the eu must have….
Inga [223]

Answer:

USB type C cables.

Explanation:

3 0
2 years ago
Other questions:
  • A machine is classified as a compound machine if it?
    8·2 answers
  • Store programming components in the shared folder. you want to secure the data in the folder as follows: members of the research
    11·1 answer
  • Question 1 (1 point)
    10·2 answers
  • Which of these forms of multimedia would most likely contain both music and text:
    14·1 answer
  • ¿Es especial que mi cumpleaños sea el día de San Valentín?<br><br> si o no
    11·2 answers
  • Consider the following C code fragment:
    10·1 answer
  • Which of the following is one of the options available on the Columns menu on the
    6·1 answer
  • Which of the following refers to a collection of colors, fonts, and effects that can be
    6·1 answer
  • A system analyst generally needs to have a number of skills. For example, technical and analytical skills are required for this
    7·1 answer
  • Consider the following correct implementation of the selection sort algorithm.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!