vendredi 14 février 2020

please help on how to display A B C D E if a input 5 numbers 1 2 3 4 5

import random
ltr =" ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print(ltr.strip())
a = input('')
b = input('')
c = input('')
d = input('')
e = input('')
print(a,b,c,d,e)
var1 = random.randrange(1,26)
var2 = random.randrange(1,26)
var3 = random.randrange(1,26)
var4 = random.randrange(1,26)
var5 = random.randrange(1,26)
print(var1,var2,var3,var4,var5)

what I want to do is when I input numbers from 1 to 26 it will display the corresponding result as you can see the user must input 5 numbers, for example, we input 1 2 3 4 5 the display must A B C D E and also we have random numbers, for example, our random numbers are 4 5 3 1 2 the result must be D E C A B i don't know what to do to display the result please help




Aucun commentaire:

Enregistrer un commentaire