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 of the following statements expresses why the following code is considered bad form? for (rate = 5; years-- &gt; 0; System
OlgaM077 [116]

Answer:

l and ll only that is the answer

7 0
3 years ago
Read 2 more answers
If you configure any more passwords on the switch, will they be displayed in the configuration file as plain text or in encrypte
Elza [17]

Answer:

The "service password-encryption" global configuration command encrypts passwords configured before and after the command is issued.

Explanation:

A switch is an intermediate network device that is used to transfer frames to nodes on its collision domain. It operates in the Data-link layer of the OSI model.

Switches uses media address control (MAC) table, containing the MAC addresses of the nodes in the network, to determine the destination of nodes.

In the global configuration mode in a switch, the password and other protocols are configured. The service password-encryption command in the global execution mode encrypts passwords configured before and after the command.

4 0
3 years ago
Give 3 advantages of using shortcut key, especially in MS Office.
Darina [25.2K]

Answer:

Efficient and time-saving. Using shortcuts makes you more efficient at doing certain tasks on your computer. ...

Multi-tasking. Being a multi-tasker is sometimes required in life. ...

Health benefits.

4 0
3 years ago
What is a logical reason why you should be able to delete your own posts on social media?
Furkat [3]

People live in the moment and post whatever they want and they just might regret it later on.

3 0
3 years ago
Read 2 more answers
If you have access to an ssn, but do not have permission to view certain folders or documents in that ssn, those folders and doc
hodyreva [135]
<span>If I remember it correct, if you have access to an ssn, but do not have permission to view certain folders or documents in that ssn, those folders and documents will be hidden. Or it depends on OS. But in most ways its hidden or masked.</span>
5 0
3 years ago
Read 2 more answers
Other questions:
  • The term composite would be used to describe an image that was altered by the Crop tool.
    15·1 answer
  • Write a program that prompts the user for a measurement inmeters and then converts it into miles, feet, and inches.
    9·1 answer
  • Jenny is working on a laptop computer and notices that the computer is not running very fast. She looks and realizes that the la
    15·2 answers
  • What is the encryption cipher that was the precursor to des??
    5·1 answer
  • What is the best option for sharing Word documents on a Microsoft network because it provides finer degrees of versioning contro
    6·1 answer
  • A production house needs an operating system that captures saves and generates information within a specific time. Which type of
    11·1 answer
  • You are developing a Windows forms application used by a government agency. You need to develop a distinct user interface elemen
    14·1 answer
  • Who is he can anyone help me​
    14·2 answers
  • An IT security threat is anything that might cause serious harm to a computer system.
    9·1 answer
  • 9
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!