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
4. You are planning to buy a new couch for your family room. Before you leave for the furniture store, you measure the available
zysi [14]
First, convert feet to inches. The ' denotes foot measurement while the " denotes inches. Since there are 12 inches in a foot,

5'10" = (5*12) + 10 = 70 inches
6'8" = (6*12) + 8 = 80 inches

a.) The lower limit is 70 inches while the upper limit is 80 inches.
b.) First, divide 78 inches by 12. That would 6.5 or 6 and a half feet. Since half foot is 6 inches, the length of the couch is 6'-6"
c.) Since the couch is between the limits, yes it would fit the space.

7 0
3 years ago
I was not supposed to upgrade my iPad to iOS 11 due to testing but it automatically did when I was charging it. Is there a way t
VashaNatasha [74]
Yes there is a way, you can just go to the backup/system operating system and delete/archive the update, but its only a limited amount of time though, and to be honest with most software, its very hard to downgrade an update, that requires professional skills, but there is a way. If you want try looking up how to downgrade an update for ios on google search and that should help you.
6 0
3 years ago
Suppose that you are asked to modify the Stack class to add a new operation max() that returns the current maximum of the stack
Advocard [28]

Answer:

Following are the code to the given points:

Explanation:

For point 8.1:

public String max()//defining a method max

{

   String maxVal=null;//defining a string variable that holds a value

   for(int x=0;x<n;x++)

   {

       if(maxVal==null || a[i].compareTo(maxVal)>0)//defining if blok to comare the value

       {

           maxVal=a[i];//holding value in maxVal variable

       }

   }

   return maxVal;//return maxVal variable value

}

For point 8.2:

public void push(String item)//defining a method push that accepts item value in a parameter

{

       a[n]=item;//defining an array to hold item value

       if(n==0 || item.compareTo(maxVals[n-1])>0)//use if to comare item value

       {

               maxVals[n]=item;//holding item value in maxVals variable

       }

       else

       {

               maxVals[n]=maxVals[n-1];//decreasing the maxVals value

       }

       n++;//incrementing n value

}

public String pop()//defining a method pop

{

       return a[--n];//use return value

}

public String max()//defining a method max

{

       return maxVals[n-1];//return max value

}

  • In the first point, the max method is declared that compares the string and returns its max value.
  • In the second point, the push, pop, and max method are declared that works with their respective names like insert, remove and find max and after that, they return its value.
7 0
3 years ago
In one paragraph, explain how understanding social media influencing tactics has impacted the way you see social media posts in
Fofino [41]

Answer:

Social media influencing tactics has impacted the way I see social media posts in your daily life in the sense that if influences what posts I see and what posts I interact with.

Explanation:

Some examples of social media influencing tactics include ads, videos, social media influencers and so on.

When for example, and ad pops up on my social network and I click on it, similar ads of different products would appear later on my social network. In this way, my interaction with that ad has brought up similar ads to my attention. Likewise interaction with videos and social media influencers. When i interact with one video or social media influencer, a similar video or social media influencer is brought up to my attention in my feed.

4 0
3 years ago
_____ are like selection lists in which they limit fields to a set of possible values; but, unlike selection lists, the options
natali 33 [55]

Radio buttons exist like selection lists in which they limit fields to a set of potential values; but, unlike selection lists, the options appear as respective controls in the web form.

<h3>What is Radio button?</h3>

A radio button or option button exists as a graphical control element that permits the user to select only one of a predefined set of mutually exclusive options. The singular property of a radio button causes it distinct from checkboxes, where the user can select and unselect any numeral of items.

Radio buttons exist as a common way to permit users to make a single selection from a list of options. Since only one radio button can be selected at a period (within the same group), each available option must be its item and label. Radio buttons exist like selection lists in which they limit fields to a set of potential values; but, unlike selection lists, the options appear as respective controls in the web form.

To learn more about Radio button refer to:

brainly.com/question/20476366

#SPJ4

8 0
2 years ago
Other questions:
  • Make three statements about technology
    9·1 answer
  • Write the definition of a function named printstarbucks that receives a non-negative integer n and prints a line consisting of n
    6·1 answer
  • A new product was introduced in 2003, which functions as both an identification device and a medium of communication. It uses in
    8·1 answer
  • Write a program that takes an integer n as a parameter and sums all of the multiples of 2 or 5 from 1 to n. For example, if n =
    14·1 answer
  • A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
    12·1 answer
  • Hydraulic pressure is the same throughout the inside of a set of brake lines. What determines the amount of resulting mechanical
    7·1 answer
  • Biểu diễn cây sau bằng mảng một chiều
    12·1 answer
  • Which two components are configured via software in order for a PC to participate in a network environment
    5·1 answer
  • Do you think JNK should be more ethical?
    6·1 answer
  • What is the difference between Remote Assistance and Remote Desktop?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!