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

Which matrix is equal to... (picture added)
Angel and Isaiah have forgotten whose turn it is to mow the lawn. How can they make a fair decision?
ok. How did texas get a greater voice in the united states government after 2010?
Discuss how America's rights and liberties are expressed in our current policy. What are basic rights of Americans. What obligations do American have. What t
Heat would best be transfered by conduction between?
can someone please awnser this for me i need to get a b in this class!!!!
You think these are right I need help on 1 question #7
4/5 = what % help me
Determine the positive x-coordinate where f(x)=g(x).
The probability for event A is 0.4, the probability for event B is 0.2, and the probability of events A and B is 0.1. The events are not independent because th