user input? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

user input?

For example: dice1 = random.randrange(1,7) dice2 = random.randrange(1,7) dice3 = random.randrange(1,7) print(“Your dice:”, dice1, dice2, dice3) dice_= dice1, dice2, dice3 Output Your dice: 2 3 6 num1 = input(“number one? “) num1 = i want to use user input to find which dice the user picked. For example user input 0 Then since 2 3 6 the answer should be 2.

25th Mar 2019, 9:36 PM
banna101
1 Answer
+ 1
Another example: greeting = “hello” first_letter = greeting[0] print(first_letter) Output should be h *** my question is how would i use user input to find which location in dice 2 3 6 the user chose***
25th Mar 2019, 9:40 PM
banna101