0
¿Porque no puedo pasar el Code Coach 37.2 de Python Core?
Este es mi código: import random random.seed(int(input())) #please don't touch this lane #generate the random values for every dice dice1 = random.randint(1,6) dice2 = random.randint(1,6) print(dice1) print(dice2) Yo no veo ningún error en mi código
10 Respuestas
+ 2
Yeah as said i had to delete the " = " between dice1 and rand...
and write it again. It looks odd because the character size changes. Don't know how but test if it helps you.
I link the version which works well in my code playground:
https://code.sololearn.com/c7Aw94V0Vo23/?ref=app
+ 2
I tried running your code in the Coach playground and it keeps on telling me that there's indentation problem where <dice1> and <dice2> were defined. The funny thing is, the same message also pops up when the original code was used, with changes only in adding value assignment for the two variables
"Your code is not running
The indentation for the dice1 and dice2 variables
is not correct. They should be on the same
indentation level as the import statement. Try
again. Fail again. Fail better."
+ 2
+ 1
Hi Daniel, you Set the start and end points in which range you want the random numbers.
Yours includes 0. The numbers in a dice are from 1 to 6
+ 1
Ipang
It doesn't work
I put the same level of indentation
+ 1
I know Daniel, I also tried, checked, and realigned indentation, and also had no luck ...
+ 1
Could you link your code in the text?
when I paste it I get syntax error in assigning.
I deleted the two = in the assignments of dice1 and dice2 and wrote it new again, also in the lines are some "invisible" spaces which I deleted, then the code runs.
+ 1
Julian Zimpel thanks!
I was finally able to pass the code coach!
0
Julian Zimpel
Sorry, but I made a mistake when copying my code, I actually wrote:
random.randint(1,6) and I don't pass
0
Julian Zimpel works!