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]
4 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:
fomenos4 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
Define Database Management System.
o-na [289]
<span>A database management system (DBMS) is defined as a computer software application which interacts with the user, other applications, and the database itself to capture and analyze data. A DBMS is generally designed to allow the definition, creation, querying, update, and administration of databases.</span>
8 0
4 years ago
Read 2 more answers
Select the correct answer.
mixas84 [53]

Answer:

A. Pixlr

Explanation:

Pixlr is one of the many free options for a graphic design software.  Pixlr is mostly an online editor (used within a browser).  It is also available as an app for both iOS and Android platforms.

Apple Aperture was a commercial product selling for US$300, but has been discontinued in 2013.

Both Adobe products are also pretty expensive.  You can no longer buy them individually, you need to purchase a monthly/yearly subscription.

6 0
4 years ago
Read 2 more answers
A ____ is an image designed to enhance a presentation (such as an electronic slide show or a printed report visually, typically
jekas [21]
The answer that best fits the blank provided above is the term PRESENTATION GRAPHICS. This graphics are images that are designed in order to improve one's presentation. An example would be electronic slide shows. This is one way to improve the transferring of information and retention to your audience. 
8 0
3 years ago
What is the three letter acronym for a network that serves just your office?
arlik [135]
A Local Area Network, or LAN.
3 0
3 years ago
Show the IEEE754 single-precision representation of the decimal number 23.45. Show your work and indicate the three parts of the
Harrizon [31]

Answer:

Sign: 0 (a positive number)

Exponent (unadjusted): 4

Mantissa (not normalized): 1.0111 0111 0011 0011 0011 0011 0011

Explanation:

First, convert to base 2 the integer part: 23.

Continue dividing the number by 2, noting each remainder, until we get a quotient that is equal to zero.

23 ÷ 2 = 11 remainder 1

11 ÷ 2 = 5 remainder 1

5 ÷ 2 = 2 remainder 1

2 ÷ 2 = 1 remainder 0

1 ÷ 2 = 0 remainder 1

Take all the remainders starting from the bottom

So 23 = 1 0111 in base 2

Then, convert to base 2, the fractional part: 0.45.

Continue multiply the number by 2, noting each integer part of the results, until we get a fractional part that is equal to zero:

0.45 × 2 = 0 + 0.9;

0.9 × 2 = 1 + 0.8;

0.8 × 2 = 1 + 0.6;

0.6 × 2 = 1 + 0.2;

0.2 × 2 = 0 + 0.4;

0.4 × 2 = 0 + 0.8;

0.8 × 2 = 1 + 0.6;

0.6 × 2 = 1 + 0.2;

0.2 × 2 = 0 + 0.4;

0.4 × 2 = 0 + 0.8;

0.8 × 2 = 1 + 0.6;

0.6 × 2 = 1 + 0.2;

0.2 × 2 = 0 + 0.4;

0.4 × 2 = 0 + 0.8;

0.8 × 2 = 1 + 0.6;

0.6 × 2 = 1 + 0.2;

0.2 × 2 = 0 + 0.4;

0.4 × 2 = 0 + 0.8;

0.8 × 2 = 1 + 0.6;

0.6 × 2 = 1 + 0.2;

0.2 × 2 = 0 + 0.4;

0.4 × 2 = 0 + 0.8;

0.8 × 2 = 1 + 0.6;

0.6 × 2 = 1 + 0.2

We didn't get any fractional part that was equal to zero.

But we've had enough iterations and at least one integer that was different from zero.

We start our decimal representation from the top

0.45 = 0.0111 0011 0011 0011 0011 0011 base 2

Beore normalization:

23.45 = 1 0111.0111 0011 0011 0011 0011 0011 base 2

After normalization

23.45 = 1. 0111 0111 0011 0011 0011 0011 0011 base 2

Normalize here means shifting the decimal mark 4 positions to the left so that only one non zero digit remains to the left of it

Sign: 0 (a positive number)

Exponent (unadjusted): 4

Mantissa (not normalized): 1.0111 0111 0011 0011 0011 0011 0011

4 0
4 years ago
Other questions:
  • Charles sends Julia text messages every morning insulting her appearance and threatening to hurt her. He writes unflattering des
    5·2 answers
  • What is the difference between a learner’s license and an operator’s license?
    13·1 answer
  • Younger people today are often called __________ because they have never known life without the Internet and cell phones.
    15·1 answer
  • A(n) _____ is a computer network that uses Internet Protocol technology to share information, operational systems, or computing
    12·1 answer
  • Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to
    13·1 answer
  • Which type of boot authentciation is more secure?
    13·1 answer
  • It is acceptable to create two TCP connections on the same server/port doublet from the same client/port doublet. True False
    9·1 answer
  • Evaluation of your strengths and weaknesses
    13·1 answer
  • . 。 • ゚ 。 .
    10·2 answers
  • 22. Write the following in full un computer
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!