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
3. What are two reasons for versioning your still life project file? (1.0 points)
inna [77]

Answer:

The project file can be managed by making its multiple version due to the following reasons.

1. We can create multiple copies or version of the project to avoid any unfortunate circumstance such as Project file can be corrupted or can be deleted. In that case we can use the other version of that project file.

2. When we are working on some project, we are modifying the code or program to achieve our desired results. In this process we may forgot the changes that we have made while modification. If we does not obtain our desired results while modification that can lead to losing the original file. To reduce this type of risk we create multiple versions of project File.

3. We also create version of our project files on some internet drives as a backup. In case our computer has lost or operating system has been corrupted. A version of our project file is available on Internet drives such as Google drive or Drop box.

3 0
3 years ago
What is included in a linked list node?
il63 [147K]

Answer: I a reference to the next node

III a data element

Explanation:

A linked list is simply referred to as a linear data structure, whereby the elements would not be stored at memory locations that are together in the sequence.

In simple words, we can simply say that a linked list is made up of nodes in which, every node has a data element and also a link or reference to the next node that is in the list.

Therefore, based on the explanation above, the correct option will be:

I. a reference to the next node

III a data element

7 0
3 years ago
PYTHON --- Toll roads have different fees based on the time of day and on weekends. Write a function calc_toll() that has three
Oduvanchick [21]

The toll program illustrates the use of conditional statements;

As a general rule, conditional statements are used to make decisions

<h3>The toll program</h3>

The toll program written in Python where conditional statements are used to make several decisions is as follows:

def calc_toll(hour, morning, weekend):

   toll_fee = 0

   if weekend == False:

       if morning == True:

           if hour < 7:

               toll_fee+=1.15

           elif hour < 10:

               toll_fee+=2.95

           elif hour <= 12:

               toll_fee+=1.90

       else:

           if hour < 3:

               toll_fee+=1.90

           elif hour < 8:

               toll_fee+=3.95

           elif hour >= 8:

               toll_fee+=1.40

   else:

       if morning == True:

           if hour < 7:

               toll_fee+=1.05

           elif hour <= 12:

               toll_fee+=2.15

       else:

           if hour < 8:

               toll_fee+=2.15

           elif hour >= 8:

               toll_fee+=1.10

   return toll_fee

   

Read more about conditional statements at:

brainly.com/question/24833629

#SPJ1

3 0
2 years ago
Write a program using integers user_num and x as input, and output user_num divided by x three times. Ex: If the input is: 2000
LenaWriter [7]

Answer:

Soory! I can't tell please tell clearly

3 0
3 years ago
Read 2 more answers
Coefficient of x in expansion (x+3)(x-1)<br>​
neonofarm [45]

Answer:

the coefficient of x here is 4

Explanation:

pls let me know if its wrong or right ..i"ll try another way than:?

5 0
3 years ago
Read 2 more answers
Other questions:
  • 5. Are you more honest in your online communication? Explain your response.
    6·1 answer
  • The numbers on the bottom of a typical check represent all of the following EXCEPT?
    12·2 answers
  • Read the spreadsheet formula below, then answer the question.
    14·2 answers
  • The word computer consists of 64 bits, which is equivalent to _____ bytes.
    5·1 answer
  • A computer retail store has 15 personal computers in stock. A buyer wants to purchase 3 of them. Unknown to either the retail st
    14·1 answer
  • Leo noticed that attackers have breached his wireless network. They seem to have used a brute-force attack on the WiFi protected
    13·1 answer
  • company gives the following discount if you purchase a large amount of supply. Units Bought Discount 10 - 19 20% 20 - 49 30% 50
    13·1 answer
  • Add me on blizzard none of my friends play ow<br> NADERJABER#2530
    8·1 answer
  • Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number
    8·1 answer
  • Which game would be classified as an advergame?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!