177k views
5 votes
Elevenplus = input ("Are you age 11 or over? (Y/N):") if elevenplus == "Y": print("you can ride the roller coaster") else: print("Not old enough for this ride") 1- A variable is used in this code, what is the name of the variable?

1 Answer

2 votes

Answer:

The variable used is elevenplus

Step-by-step explanation:

Given

The above code segment

Required

The variable in the code

In Python, variables are used to take inputs, and they are used to storing values.

On the first line of the program, elevenplus is used to get input for age.

Up till the end of the program, no other variable is introduced.

Hence, the variable in the program is elevenplus

User Petar Sabev
by
6.0k points