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
artcher [175]
4 years ago
9

Write a program that prompts the user to input two numbers, a numerator and a divisor. Your program should then divide the numer

ator by the divisor, and display the quotient and remainder.
(this is python and i really need help. this is the code i have so far and it won’t accept it.)
Computers and Technology
1 answer:
fredd [130]4 years ago
5 0

Answer:

#first section

a= float(input(" enter Numerator: " ))

b= float(input(" enter Divisor: "))

#second section

c = a//b

d = a%b

 

#third section

print(c, "is the quotient")

print(d, "is the remainder")

print ( c," remainder ",d)

Explanation:

In python (programming language) there are other ways to divide other than using the normal division "/".

we have floor division "// " and % modulo

<h3>floor division "//" gives you just the QUOTIENT </h3><h3>modulo gives you  the REMAINDER.</h3><h2></h2>

now the program is divided into 3 sessions to make it easy for you to understand.

The first session - This is the input session, it prompts you to in put two values respectively, one for the Numerator and one for the divisor.

The second session - this is where the calculation happens, we carry out a floor division first and then a modulo division.

The third session -  This is the Output session prints your answer to the screen, firstly it tells you which number is the quotient and which number is the remainder, after that it combines both the quotient and the remainder into one output

You might be interested in
One of the difficult decisions a systems analyst has to make when it comes to software is whether to recommend making, buying, o
Mademuasel [1]

Answer:

Explanation:

There are different advantages to buy commercial software like:

- Is a system used for other companies, we will have good referents with the feedback of them.

- Support, we should have support twenty-four hours, if a system doesn't have good support, we must not buy the software.

- We can choose software with a lower initial cost, this depends on our needs.

3 0
3 years ago
What is the output of the following code?
Lynna [10]

Answer:

The output is 24

Explanation:

Given

The above code segment

Required

The output

We have (on the first line):

x = 6

y = 3

z=24

result=0

On the second line:

result = 2*((z/(x-y))\%y+10)

Substitute the value of each variable

result = 2*((24/(6-3))\%3+10)

Solve the inner brackets

result = 2*((24/3)\%3+10)

result = 2*(8\%3+10)

8%3 implies that, the remainder when 8 is divided by 3.

The remainder is 2

So:

result = 2*(2+10)

result = 2*12

result = 24

<em>Hence, the output is 24</em>

8 0
3 years ago
Your friend really likes talking about owls. Write a function owl_count that takes a block of text and counts how many words the
andriy [413]
Text = “ I really like owls. Did you know that an owls eyes are more than twice as big as the eyes of other birds of comparable weight? And that when an owl partially closes its eyes during the day, it is just blocking out light? Sometimes I wish I could be an owl.

word = ‘owl’
texts = text.lower()
owlist = list(texts.split())
count = text.count(word)
num = [owlist, count] #num has no meaning just random var
print(num)


Alter in anyway you want so that you can succeed. ✌
4 0
3 years ago
Quick!!! Brainliest
xxTIMURxx [149]
D. A technology-and creativity-driven world
7 0
3 years ago
Determine the exact output of the code:
stiv31 [10]

Answer:

3

Explanation:

The function floor() is used to give the integer which is smaller than or equal to the provided decimal value.

for example:

let a=5.8

floor(a);

the function provides the value 5 (smaller than or equal to 5.8).

In the given code:

variable num assigns the number 3.14.

then, floor(3.14) gives the value 3 (smaller than or equal to 3.14).

then, the echo print the value on the screen.

Therefore, the correct answer is 3.

4 0
4 years ago
Other questions:
  • Which of the following is a goal of paraphrasing and summarizing?
    14·2 answers
  • PLEASE VERY IMPORTANT Conduct research on graphic design skills in your area and explore the different courses that they offer l
    12·1 answer
  • How to charge your phone quickly
    9·2 answers
  • The signature area in a cover letter includes the sender's first and last name, followed by his/her job title (if applicable). *
    13·1 answer
  • Drag each tile to the correct box.
    15·1 answer
  • What is a cloud in the world of computing
    7·1 answer
  • How many different textile items would you find at a festival? (please list 5 items)
    7·1 answer
  • The process of sending a result back to another part of the program is
    14·1 answer
  • How to get the lightning round in dares of eternity
    5·1 answer
  • The chain of _____ documents that the evidence was under strict control at all times and no unauthorized person was given the op
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!