How can I have multiple inputs in my code, whitout any errors? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I have multiple inputs in my code, whitout any errors?

I am trying to make a custom dice roller, in which I can choose the amount of dices, anf eyes on the dices I want; but my code gets an EOF error on line 4. How can I have multiple input in the same code? import random x = int(input("Enter the number of dices you want:")) + 1 y =int(input("Enter the amount of eyes you want on your dice:")) for i in range(1, x): print(random.randint(1,y))

30th Oct 2017, 7:57 PM
Sindre Havn
Sindre Havn - avatar
1 Answer
+ 1
If you're running in Sololearn, multiple inputs are on separate lines. So put the # of dies on the first line, and the eyes (is that right?) on the next: 1 6
30th Oct 2017, 9:21 PM
LunarCoffee
LunarCoffee - avatar