answer.
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]
2 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:
fomenos2 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
Select the correct answer from each drop-down menu. Rita runs a small business that designs custom furnishings for corporate cli
LUCKY_DIMON [66]

Software as a Service cloud model is ideal for Rita’s business. SaaS are office solutions that allow Rita’s small business to work more efficiently and in a more organized way. Most SaaS applications are used for invoicing and accounting, sales, performance monitoring, and overall planning. SaaS applications can save Rita money. They do not require the deployment of a large infrastructure at her location. As a result, it drastically reduces the upfront commitment of resources. Whoever manages SaaS’s IT infrastructure running the applications brings down fees for software and hardware maintenance. SaaS has generally been acknowledged to be safer than most on-premise software.

5 0
2 years ago
Read 2 more answers
Type the correct answer in the box. Spell all words correctly.
kvasek [131]

Answer:

Presentations?

Explanation:

6 0
2 years ago
At which stage should James, a website designer, gather information about the website he wants to create, and at which stage sho
viva [34]
<h2>Answer: James should gather information in the <u><em>Learning</em></u> phase and begin the site’s coding in the <u><em>Development</em></u> phase.</h2>

8 0
2 years ago
Rupa would like to quickly insert a table into her document without having to worry about formatting the data in the table. Whic
USPshnik [31]
Internet tap and log on application
6 0
2 years ago
Read 2 more answers
Web client software, such as Chrome, Firefox, Internet Explorer, Safari, and Opera, that are used to view Web pages are known as
evablogger [386]

Answer: Web Browsers

Explanation: The application software that works on the World Wide Web(www) is known as the web browser. Web browsers are the application must be installed on the user's system so that the accessing of the web server can be done.

There are different types of web browsers, out of which the most popular is Chrome and other examples are Internet Explorer, Opera, Firefox etc.

8 0
2 years ago
Read 2 more answers
Other questions:
  • Consider a simple application level protocol built on top of udp that allows a client to retrieve a file from a remote server re
    15·2 answers
  • Suppose a digital camera has a storage capacity of 256mb. how many photographs could be stored in the camera if each consisted o
    8·1 answer
  • Jesse would like to modify the table that he has inserted into a Word document by making the first row a single header cell.
    15·2 answers
  • Write a program named SortWords that includes a method named SortAndDisplayWords that accepts any number of words, sorts them in
    10·1 answer
  • As in algebra, you can use brackets to override the order of operations Excel follows to perform formula calculations. True or f
    13·1 answer
  • Use the AND function with appropriate arguments in cell H11 to determine if there is a force out at third base. There is a force
    14·1 answer
  • Write the definition of a function printAttitude, which has an int parameter and returns nothing. The function prints a message
    14·1 answer
  • Using virtualization comes with many advantages, one of them being performance. Which of these is NOT another realistic advantag
    7·1 answer
  • +10 POINTS AND BRAINLIEST!! HELP ME PLEASE!!~~~
    13·1 answer
  • What prevents someone who randomly picks up your phone from sending money to themselves using a messenger-based payment?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!