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

what was the cause of his demise that landed matisse into the hospital?​
part a. the sun produces 3.9 x 10^33 ergs of radiant energy per second. how many ergs of radiant does the sun produces in 3.25 x 10^3 seconds?part b. which is m
YALL BETTER NOT SPAM ME I WILL CALL THE COMPANY ON YALL
in 2010, the continent of south america has a population of 395,280,204. which of the following is the closest estimate of this number? A 3x10^8 B 4x10^7 C 4x10
Suppose that your boss must choose three employees in your office to attend a conference in Jamaica. Because all 17 of you want to go, he decides that the only
Write 6.384 to 1 decimal place
For which value of X is the relation not a function? Plz answer ASAP test due in 10 minutes A.6 B.1 C.3 D.4
Does this poem sound good? I want feedback pls ty :)
Spanish colonists who had been born in Spain occupied the Mestizo level of society. True or false
find the acceleration if the force is 10 N and the mass is 5000g