python 3.x - How to give three letters individual tasks -
Import a random print ('Please enter one of three letters \ nfor easy \ nExchange \ n normal ('E'): Print ('E was selected') Alif input (). Starts with '(' n '): print (' h was selected ') otherwise: Print (Enter 'E, N or H') / Pre> I want the user to be able to enter E, N or H, and then print it for its What to choose later.
difficulty = input (\ 'please enter one of three letters \ n for easy to enter \ n \ N 'Hard to be' for general '') if (difficulty) (at) = ('E'): #Do "E" print things ('E was selected') Alif (difficulty. () == 'N'): #Do "N" things print ('n selected') alif (difficulty. Para () == 'h'): # dow "h" things were printed ('h was selected ') And: Enter the print (' E, N or H ') REPL:
Comments
Post a Comment