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
/*Implement a class Address . An address has a house number, a street, an optional
Ludmilka [50]

Answer:

Java.

Explanation:

public class Address {

   int houseNumber;

   String street;

   int apartmentNumber;

   String city;

   String state;

   int postalCode;

   public Address(int houseNumber, String street, String city, String state, int postalCode) {

       this.houseNumber = houseNumber;

       this.street = street;

       this.city = city;

       this.state = state;

       this.postalCode = postalCode;

   }

   public Address(int houseNumber, String street, int apartmentNumber, String city, String state, int postalCode) {

       this(houseNumber, street, city, state, postalCode);

       this.apartmentNumber = apartmentNumber;

   }

   public void printAddress() {

       System.out.printf("Street: %s%n", this.street);

       System.out.printf("City: %s, State: %s, Postal Code: %d.%n", this.city, this.state, this.postalCode);

   }

   public boolean comesBefore(Address other) {

       if (this.postalCode < other.postalCode) {

           return true;

       }

       else {

           return false;

       }    

   }

}

The few changes I made are in bold.

8 0
3 years ago
All of the Internet in your country disappears. What happens next?
Talja [164]

Answer:

It is most likely that in a tech surrounded environment there would be an apacolypse, not necessarily a man hunting man apacolypse but it would cause a huge panic throughout that country because government could not communicate which is what leaves people with a safeplace.

Explanation:

please mark as brainliest xx hope it helps <3

if you really like this topic watch into the forest on netflix, it has the same premise except its not that internet disappears its electricity.

4 0
2 years ago
Computer World sells laptops separately from accessory products like docking stations, anti-virus software, and external hard dr
uysha [10]

Answer:

Optional product pricing

Explanation:

<em>Optional product pricing</em> occurs when a product is sold for a much lower price but complementary products or accessories are sold separately to generate profit.

A typical example is in the printer category, printer cartridges are sold separately from the printer when the one in the newly purchased printer runs out. The customer is forced to purchase new cartridges that the company benefits from as profits.

Optional product pricing is a strategy to provide less expensive technology while exploiting the frequent use of accessories to make a substantial profit.

6 0
3 years ago
What is the output of the following program? #include using namespace std; class TestClass { public: TestClass(int x) { cout &lt
Alik [6]

Answer:

An error will be occurred here. In C++ a function must be like

returntype function_name(){

}

but the functions in given class does not have returntype given. So there will be a syntax error.

If the returntype is defined then the code does not show any output since nothing is printed in the main function.

4 0
3 years ago
Which technology can allow a single ground-based telescope to achieve images as sharp as those from the Hubble Space Telescope?
Ganezh [65]

Answer:

The correct answer to the following question will be "Adaptive Optics".

Explanation:

  • AO (Adaptive Optics) is a technique used to enhance optical system performance by reducing the impact of incoming gravitational wave distortions by compressing a mirror to compensate for the distortion.
  • It operates by calculating and compensating for defects in a wave-front with a system that corrects these errors as a deformable mirror or even a liquid crystal collection.
  • It is a technique that can make it possible for a single ground-based telescope to get images as clear as that of the Hubble Space Telescope.
  • Certain methods can achieve power resolution that exceeds the limit set by atmospheric distortion, for example, Aperture synthesis, Lucky imaging, and Speckle imaging.

Therefore, Adaptive Optics is the right answer.

7 0
3 years ago
Other questions:
  • What are factors that limit a technological design
    13·1 answer
  • Will upvote all answers
    7·1 answer
  • The function below takes a single parameters: a list of numbers called num_list. Return a new list containing just the three lar
    5·1 answer
  • Please Help!
    14·2 answers
  • What term is defined as private data placed in a packet with a header containing routing information that allows the data to tra
    13·1 answer
  • To achieve asymptotically optimal performance, a skip list must use promotion probability . true or false and
    14·1 answer
  • How does the Evaluate Formula dialog box help fix errors?
    9·2 answers
  • A style sheet consists of CSS ______________________ that specify the layout and format properties to apply to an element. *
    13·1 answer
  • When all the system testing and bugs correction has done, the software product will be delivered to the user for __________.
    15·1 answer
  • Describe two types of software suites supporting your answer with three examples each.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!