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

material composed of two or more elements or compounds that are physically mixed together but not chemically combined whats the answer please?
What is the second number of an ordered pair called
The question is evaluate x÷1.2 for each value of x         x=40.8
3xsquared + 14x -5 = 0 Zero Product Property?
Discuss several characteristics of wartime propaganda in the United States during the second World War.
Write the number 345,000 in two other ways
3xsquared + 14x -5 = 0 Zero Product Property?
what does tropic of capricorn
Please help me anyone ?????
Is paper biotic, or abiotic ?