mcarville0802 mcarville0802
  • 23-11-2020
  • Computers and Technology
contestada

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

Respuesta :

Cytokine
Cytokine Cytokine
  • 23-11-2020

In python 3.8:

if user_tickets < 5:

   num_tickets = 1

else:

   num_tickets = user_tickets

For this code to work properly, you'll have to first declare user_tickets before the if-else statements.

Answer Link

Otras preguntas

Do you know what this is? Around the mouth.
please help asap!!!!!!​
I’d like to stay at home ……going out this evening. a. rather than b. instead of c. more than d. better at
Hiroto spends \$68 on e-books and paperback books combined. Each e-book he buys costs $5 and each paperback book he buys costs $12. If Hiroto buys e-books and y
If l||m, find the value of y
Help me with ex.4 pleaseeee
If 134n = 54eight , calculate n​
bio!! help pls will give brainliest to correct answer
Which equation has infinitely many solutions? Lesson 2-4 __ 3/4x + x − 5 = 10 + 2x ​3x − 2.7 = 2x + 2.7 + x 9x + 4.5 − 2x = 2.3 + 7x + 2.2 1/5x − 7 =3/4 + 2x
What physical and behavioral adaptations do zebras have that help them evade predators? (Site 1)