Write an if-else statement for the following: If userTickets is less than 5, execute awardPoints = 1. Else, execute awardPoints = userTickets. Ex: If userTickets is 3, then awardPoints = 1.
var awardPoints = 0;var userTickets = 4; // Code will be tested with values: 4, 5 and 6

Respuesta :

Answer:

Explanation:

#no programing language stated, but using python.

awardPoints = 0

userTickets = 4

userTickets = int(input("Enter the number tickets"))  #this statement gets the user input

If userTickets < 5: #this test the first user input

awardPoints = 1

elif userTickets ==3:

awardPoints = 1

else:

awardPoints = userTickets

print("The awardpoints is ", awardPoints)

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE