-1
 print("What is your name?") 
 Name = input().title() 
 Class = str(input ("What class are you in? "))
 while Class != "1" and Class != "2" and Class != "3": 

I want python to say that no name has been in putted by checking something has been entered.

1 Answers1

1

use a list of options

options = ['1', '2', '3']

while True:
    Class = input('Please enter your class')
    if Class not in options:
        # try again
        continue
    else:
        break
danidee
  • 9,298
  • 2
  • 35
  • 55