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
GaryK [48]
3 years ago
7

Write an application to pre-sell a limited number of cinema tickets. Each buyer can buy as many as 4 tickets. No more than 100 t

ickets can be sold. Implement a program that prompts the user for desired number of tickets and then display the number of remaining tickets. Do not allow the user to enter an invalid number of tickets. Repeat until all tickets have been sold, and then display the total number of buyers. Safe the file as Tickets.java.
Social Studies
1 answer:
aliya0001 [1]3 years ago
8 0

Answer:

Python code explained below

Explanation:

<u>**CODE: </u>

tickets = 100

count = 0

# Loop runs until tickets become zero

while tickets !=0:

   print("There are currently", tickets, "tickets remaining.")

   # Taking input from user for tickets

   userInput = int(input("How many tickets would you like to purchase?"))

   # If user enters more than 4 tickets

   if userInput > 4:

      print("You cannot purchase more than 4 tickets")

   # If available tickets are less than user requirment

   elif tickets < userInput:

      print("Available tickets are less than required")

   else:

       # Count increment to store the users who brought

       count += 1

       # Decrementing the available tickets with the user requirements

       tickets -= userInput

       print("Transaction successful")

   print()

print("All the tickets are sold")

print("The total number of buyers was ", count)

You might be interested in
Plz help me plz plz help me ​
kramer

Answer:

Amylase/ Saliva

pepsin/ protein

lipase/ fats

bile juice/ Emulisfiction

gastric juice/ hydrochloric acid

Explanation:

NOT SURE OF MY ANSWERS BUT IF RIGHT PLZ GIVE BRAINLIEST AND THANK ME I WORKED REALLY HARD DOING IT

THANK U

STAY SAFE AND STAY HEALTHY :)

3 0
3 years ago
HELPP MEEE
Paraphin [41]
Not sure if this is correct orty-five states and the District of Columbia levy general sales taxes that apply (with some exemptions) to all goods and certain services. Thirty-seven states (including, Alaska, which has no state tax) also allow general sales taxes at the local level. Most states apply separate sales taxes to particular goods, including tobacco, alcohol, and motor fuels.
6 0
3 years ago
Read 2 more answers
Austin and cody play together with their trucks in the sandbox. this is an example of _____ play.
Mumz [18]

Austin and Cody play together with their trucks in the sandbox. This is an example of <u>cooperative</u> play.

Cooperative play can be included in a variety of ways into your family's everyday routine. Simple actions like sharing toys with a sibling, helping set the table for supper, and reading a book together are a few excellent examples.

When kids play together, they have common objectives. They might organize their play and decide on the rules. Of the six play stages, it is the most difficult.

Kids can develop their social skills through cooperative play as they learn how to deal with group dynamics. It teaches kids how to cooperate and make concessions to others, acknowledge and respond to others' emotions, share, be affectionate, and settle disputes.

Learn more about cooperative play here

brainly.com/question/26873932

#SPJ4

6 0
1 year ago
Find another (Greek myth or other mythology:Egypian, Norse, Native American, African, Asian, etc.) and summarize its plot in the
Assoli18 [71]

Answer:

  .

Explanation:

5 0
3 years ago
Read 2 more answers
Where was the ancient region mesopotamia located
Elza [17]

between the Euphrades river and the tigris river

5 0
3 years ago
Other questions:
  • 4. Explain the importance of regeneration in silviculture.
    10·1 answer
  • Which of the following was one of the results of European explorers looking for new routes to Asia? A. The population of Europe
    13·1 answer
  • Please explain the differences of Structures between a poem, drama, fiction. How can these different types of literature be simi
    8·1 answer
  • When returning from sea, a green navigational buoy should be passed in what manner
    6·1 answer
  • What are some practices that humans can adopt to slow down erosion?
    5·1 answer
  • What percentage of life in the rainforest is found in the canopy
    9·1 answer
  • Express one light minute in km and meters
    12·1 answer
  • Which of these is not a problem facing the many African nations?
    6·1 answer
  • Research evidence suggests that happiness depends more on __________ factors than on __________ factors.
    9·1 answer
  • Qualitative research requires participants to have first-hand experience with the phenomenon. true or false?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!