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
Aleonysh [2.5K]
3 years ago
13

How to write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator).

Your program should then divide the numerator by the denominator, and display the quotient followed by the remainder in python.
Computers and Technology
1 answer:
fomenos3 years ago
3 0

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 />

You might be interested in
Which can be used to plan a program?
Marina86 [1]

Answer:

Pseudocode.

Hope this helps you...

Explanation:

8 0
3 years ago
Read 2 more answers
When you write contracts, should you list many definitions at the start of the document?
aev [14]

Answer:

You can.

Explanation:

If you want you can, but usually as you cover topics you should list the definitions for each topic then instead of all at the beginning you do not want it to seem like it is a lot.  

4 0
3 years ago
Commercials are short media advertising that persuades a consumer to buy/use their product/service?
ioda

Answer:

true

Explanation:

thats what they are

6 0
3 years ago
Read 2 more answers
What is and effective way to display calculation in a word document?
Tju [1.3M]
You only put a numerical expression in  numbers if it is over 100, it the calculation correctly.
<span />
8 0
4 years ago
The idea of supply and demand is based on the development of
Crazy boy [7]

Answer:

The idea of supply and demand is based on the development of sufficient products to meet consumer wants.

Explanation:

In economic theory supply and demand explains the relation between price ,sellers and buyers of a resource.

If the demand increases and supply increases it dose not have any affect on price.

If demand increase and supply decrease it triggers an increase in price

If demand decrease and supply increase it triggers decrease in price.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Which operating system became obsolete with the arrival of a more advanced graphical user interfaces
    6·1 answer
  • The support group at Universal Containers wants agents to capture different information for product support and inquiry cases. I
    14·1 answer
  • A vertical curve means that any change in the Aggregate Price Level will have what result?
    15·1 answer
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • ) A popular PivotChart that is used in Access is (Points : 4) column.
    9·1 answer
  • Limitations of the information systems used by tesco​
    7·1 answer
  • What is pseudo code?
    11·2 answers
  • The web design teams of a company are working on designing websites for various companies, Pick the ideas that employ proper use
    13·1 answer
  • Select the correct technical term for each definition by using the drop-down menus.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!