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
What factors were most important to establishing and maintaining a civilization?.
scoray [572]
Answer:

The six most important characteristics of a civilization are cities, government, religion, social structure, writing, and arts and architecture.

To establishing a civilization - Cities grew on rivers and bodies of water where people could farm or fish for food. Rivers provided transportation and trade. Rivers provided rich soil and water for fields.

6 0
1 year ago
For people who want pointss!!!!!​
uysha [10]

Answer:

Thk :)

Have a good day ✨

6 0
3 years ago
Read 2 more answers
Please help me in this
maw [93]

Answer:

I do not understand the question

Explanation:

5 0
2 years ago
This is an economic indicator that is computed by the bureau of labor statistics and is meant to measure the average change in p
Ipatiy [6.2K]

The answer is: Producer price Index

Producer price index will define the price point where both producers and consumers deemed as 'fair' for the exchange of a good or service.

Generally, researchers use this index as an indicator of average income and the cost of living. If the producer price Index is increased in a certain area, we can know that the average cost of living and the average income in that area is also increased.

6 0
3 years ago
How did Taney's opinion affect the Missouri Compromise?​ PLEASE HELP ME PLEASE!!
liubo4ka [24]

Answer:

Chief Justice Roger Taney declared Missouri Compromise to be illegal and unconstitutional.

Explanation:

The Missouri Compromise seen was a crucial agreement to balance the power in Congress between slave and free states. The purpose of the Missouri Compromise was to settle the dispute. As a result, it banned slavery in the north (Louisiana territory) from the southern line of latitude 36 degrees 30'. It was during The Dred Scott v. Sandford judgment by the Supreme Court found that the Missouri Compromise was illegal. Roger Taney affirmed that the Missouri Compromise was unconstitutional because Congress had no authority to forbid slavery in territories. To justify his statement, he mentions about the Fifth Amendment that gives citizens (slave master) a right to have property rights.

6 0
2 years ago
Other questions:
  • Foreign policy social studies
    5·2 answers
  • 1. Monopoly
    5·2 answers
  • Please help me. Please make sure it is right and will give brainlest. Question 1 (1 point) Question 1 Saved
    6·2 answers
  • How many states are there?
    5·1 answer
  • Patwardhan et al. report data from a study where they hired experimental confederates to attend speed dating events, posing as d
    10·1 answer
  • 5. What nationally known company was a direct result of the first Texas oil boom?
    8·2 answers
  • Why would a producer of a product dislike having a shortage a surplus?
    11·1 answer
  • In Citizens United v. Federal Election Commission, the Supreme Court issued a decision that led to a decrease in political spend
    13·1 answer
  • People who gain an understanding for the deep-level diversity among their coworkers do so after_______ interactions, often leadi
    14·1 answer
  • What proportion of elected officials in the United States represents single-member districts? A. Most officials, across local, s
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!