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

range of motion definition
What is 9/10-3/5 in fractions
what is 13 approximated to the nearest tenth? Answers: A. 3.5
How did geography affect life and the economy in the Middle Colonies?
how did the Soviet Union's foreign policy goals contradict one another ?
Since your little brother loves cereal you decide to give him his favorite cereal cinnamon toast crunch as a surprise present. There is only one square sheet of
what does asterisk mean
Maximum or Minimum. Domain and range of y=x^2-4x+4
A change of phase never accompanies a. a change in volume b. a change in pressure c. a change in temperature d. a change in density e. a change in structure
What's 2/3 times 5/6 times14