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
Arte-miy333 [17]
2 years ago
14

The video game machines at your local arcade output coupons depending upon how well you play the game. You can redeem 10 coupons

for a candy bar or 3 coupons for a gumball. You prefer candy bars to gumballs. Write a program that inputs the number of coupons you win and outputs how many candy bars and gumballs you can get if you spend all of your coupons on candy bars first, and any remaining coupons on gumballs.
Computers and Technology
1 answer:
Lilit [14]2 years ago
3 0

Answer:

coupons = int(input("Enter the number of coupons you win: "))

candy_bars = int(coupons / 10)

gumballs = coupons % 10

print("Candy bars: " + str(candy_bars) + ", Gumballs: " + str(gumballs))

Explanation:

*The code is in Python.

Ask the user to enter the number of coupons

Calculate the number of candy bars, divide the coupons by 10 and typecst the result to int

Calculate the number of gumballs, use the modulo to find the remainder

Print the values

You might be interested in
A good way to assess your CPU usage is to:_______.
inna [77]
C is likely the best answer here.
8 0
3 years ago
What does a spam e-mail normally promise you?
nlexa [21]
The answer is a virus
7 0
3 years ago
A computer can function in the absence of software true or false​
NISA [10]

Answer:false

Explanation:

7 0
3 years ago
Read 2 more answers
In an ipv4 address, what are the maximum number of bits that can be used to identify the network address
Solnce55 [7]
Up to 24 bits can be used to identify unique <span>networks.</span>
5 0
3 years ago
Convert 30 to hexadecimal ​
Delvig [45]

Answer:

1E

Explanation:

Here is a table to help you. Similar to a multipication table, just follow either the number 3 down to A (aka 10) or 6 x 5 and you will find your answer of

1E = 30

6 0
3 years ago
Other questions:
  • A collection of coordinating colors that can be used in an Excel document is called a color
    8·1 answer
  • Which of the following sentences uses the correct verb tense?
    8·2 answers
  • You can use the_______key if your cursor is at the end of the word. Use the______key if you place the cursor on the left side of
    11·1 answer
  • What are the uses of joystick​
    13·1 answer
  • Themes are applied from which tab?
    6·1 answer
  • The work principle is not always true<br> T or F
    11·2 answers
  • List three tacos there are several from the opening page of the help and support center.
    5·1 answer
  • Which type of computing device is best suited to having a digital pen as an input device?
    9·1 answer
  • An ____ is an object that produces each element of a container, such as a linked list, one element at a time.
    13·2 answers
  • 2. Explain the difference between a JMP instruction and CALL instruction
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!