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
Ksju [112]
4 years ago
15

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: 2000

2 Then the output is: 1000 500 250
Computers and Technology
1 answer:
tankabanditka [31]4 years ago
7 0

Answer:

The program written in Python is as follows:

<em>user_num = int(input("Number: ")) </em>

<em>x = int(input("x: ")) </em>

<em>for i in range(1,4): </em>

<em>      user_num = user_num/x </em>

<em>      print(user_num," ")</em>

Explanation:

This line gets user_input from the user

<em>user_num = int(input("Number: ")) </em>

<em />

This line gets x from the user

<em>x = int(input("x: ")) </em>

<em />

This line iterates from 1 to 3

<em>for i in range(1,4): </em>

This line divides user_num by x

<em>      user_num = user_num/x </em>

<em />

This line prints the result of the division

<em>      print(user_num," ")</em>

You might be interested in
In this class, it is very common for your computer screen to look like this. What is this?​
Vsevolod [243]
Theres no Picture???
8 0
3 years ago
How to write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator).
fomenos

Answer:

num1 = int(input("Numerator: "))

num2 = int(input("Denominator: "))

if num1 < 1 or num2<1:

     print("Input must be greater than 1")

else:

     print("Quotient: "+str(num1//num2))

     print("Remainder: "+str(num1%num2))

Explanation

The next two lines prompts the user for two numbers

<em>num1 = int(input("Numerator: "))</em>

<em>num2 = int(input("Denominator: "))</em>

The following if statement checks if one or both of the inputs is not positive

<em>if num1 < 1 or num2<1:</em>

<em>      print("Input must be greater than 1")-> If yes, the print statement is executed</em>

If otherwise, the quotient and remainder is printed

<em>else:</em>

<em>      print("Quotient: "+str(num1//num2))</em>

<em>      print("Remainder: "+str(num1%num2))</em>

<em />

3 0
3 years ago
Tricia listed her assets and liabilities. Credit Card Bill Car Loan Bonds Piano Bank Account Bicycle Which are Tricia’s liabilit
DIA [1.3K]
<span>Her liabilities are her credit card bill and her car loan. These are things that she owes and has to pay off, so they are liabilities due to the fact that she owes for these items. Her bonds, piano, bank account, and bicycle are counted as assets.</span>
7 0
3 years ago
Read 2 more answers
Helen has no experience in security. She would like to earn a certification that demonstrates that she has the basic knowledge n
rewona [7]

Answer:

Option C. Security+ is the correct answer.

Explanation:

8 0
3 years ago
In addition to regular watch features, which two features are often found on smart watches?
andriy [413]
Phone capabilities and fitness monitoring
5 0
3 years ago
Other questions:
  • Corey is an architect. What software does he most likely use to design houses? graphic software scheduling software CAD software
    10·2 answers
  • A method's name and parameter list constitute the method's ____.
    13·1 answer
  • A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.
    14·1 answer
  • type of weapon of mass decruction taht spreads deadly radioactive material by way of conventinal explosion
    15·1 answer
  •  Which device containing sensors send signals to the computer whenever light changes are detected? 
    11·1 answer
  • What direction would a sprite go if you constantly increased its x property? Your answer What direction would a sprite go if you
    7·1 answer
  • What happens when a dataset includes records with missing data?
    9·1 answer
  • What is data intergrity​
    13·1 answer
  • You have implemented an access control method that only allows users who are managers to access specific data. Which type of acc
    11·2 answers
  • Write a while loop that continues to increment uservalue by 5 as long as uservalue is less than 0.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!