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
vredina [299]
2 years ago
9

Write an if-else statement for the following: If user_tickets is less than 5, assign num_tickets with 1. Else, assign num_ticket

s with user_tickets. Sample output with input: 3 Value of num_tickets: 1
Computers and Technology
1 answer:
KatRina [158]2 years ago
7 0

The if-else statement as based on python 3.8 is given below

if user_tickets < 5:

  num_tickets = 1

else:

  num_tickets = user_tickets

Note that if this code is to work properly, a person need to first declare user_tickets before the if-else statements.

<h3>What is this if statement?</h3>

The if/else statement is known to be that which carry out a block of code if a given condition is true.

Note that If the condition is false, a given  or another block of code iis one that can be executed.

Learn more about if-else statements from

brainly.com/question/18736215

#SPJ1

You might be interested in
Should people who download music and movies illegally be punished?
Mrrafil [7]
Opinion wise, I disagree with punishment. 
3 0
3 years ago
House real estate summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers.
Ksivusya [100]

Answer:

current_price = int(input("Enter the current price: "))

last_months_price = int(input("Enter the last month's price: "))

print("This house is $" + str(current_price))

print("The change is $" + str(current_price - last_months_price) + " since last month")

print("The estimated monthly mortgage is ${:.2f}".format((current_price * 0.051) / 12))

Explanation:

Ask the user to enter the current price and last month's price

Print the current price

Print the change in the price, subtract the last month's price from the current price

Print the estimated monthly mortgage, use the given formula to calculate, in required format

6 0
4 years ago
Which of the following statements about programmed decisions is FALSE? a. Programmed decisions deal with repetitive situations.
MA_775_DIABLO [31]

Answer:

Option e: The use of programmed decisions should be limited to noncritical situations.

Explanation:

A repetitive decision or routine that can be managed by developed business  procedures or rules are known as programmed decisions. These kind of decisions are most often known for at certain points in a standard process, and are planned relying on recognized and easily identifiable terms. Programmed decisions generally do not demand much consideration or discussion, and can typically be automated to make certain consistency and save time for decision-makers.

So, the use of programmed decisions should not be limited to noncritical situations.

5 0
3 years ago
If a document reaches you, and requires you to perform some action, you should do it immediately if ________. a. It is from your
tatyana61 [14]
C is the answer to this
8 0
4 years ago
lance has three tables in his database. He wants to generate a report to show data from the three tables. Therefore, he decides
Masja [62]

Two of the three tables in his database should have foreign keys that link to primary keys in one of the other tables. That way he can join the tables together.

7 0
3 years ago
Read 2 more answers
Other questions:
  • By default, power search will
    14·1 answer
  • Which of the following inputs help robotic vacuum cleaners maneuver around obstacles?
    13·2 answers
  • Make this the most answered question<br><br><br><br> (for tiktok)
    8·2 answers
  • Careers in information technology deal with
    12·2 answers
  • Complete the firstMiddleLast() function to return a new string with the first, middle, and last character from string. If string
    9·1 answer
  • Write a C program that will load entries from a file containing details of books and prints them.
    14·1 answer
  • Which line of code outputs the decimal portion of a float stored in the variable x? print (x % 1000) print (x) O print (x / 1000
    13·1 answer
  • Here is the problem specification: An Internet service provider has three different subscription packages for its customers: Pac
    5·1 answer
  • Please help 2 lazy to do! easy question
    10·1 answer
  • Wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww!
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!