shmueller3290 shmueller3290
  • 19-05-2021
  • Computers and Technology
contestada

Ask how many apples the user wants. Ask how many people the user will share the apples with. Find out how many apples will remain if you share the apples equally. Hint: use modulus %.

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 19-05-2021

Answer:

The program in Python is as follows:

apples = int(input("Apples: "))

people = int(input("People: "))

apples%=people

print("Remaining: ",apples)

Explanation:

This gets the number of apples

apples = int(input("Apples: "))

This gets the number of people to share the apple

people = int(input("People: "))

This calculates the remaining apple after sharing the apple evenly

apples%=people

This prints the calculated remainder

print("Remaining: ",apples)

Answer Link

Otras preguntas

which decimal round to 17.29 when rounding to the nearest hundredth
Use the spinner to identify the probability to the nearest hundredth of the pointer landing on a non-shaded area. HELP ASAP!!
Buying on margin was a method of buying stocks with mostly borrowed money. T/F
What mountain ranges flank either side of the central deccan plateau?
Which of the following is not one of the symptoms of the pelvic inflammatory disease (PID) ?
What skills are needed to be an editor? I WILL GIVE YOU BRAINLIEST FOR THE BEST ANSWER AND EXPLANATION
Don’t answer this question.
Two or more waves combining to produce a wave with a smaller displacement is called _____. A. constructive diffraction B. constructive interference C. des
Several famous twentieth-century graphic designers were from Switzerland. Which Swiss designer created the Univers typeface?
A ship's foghorn will probably have a _____. high pitch low amplitude low pitch