+ 1

Here...idk why but even if i enter the correct number...it prints 'wrongly guessed'

https://code.sololearn.com/cWK2RD2FJz5O/?ref=app

30th May 2019, 4:36 AM
Y AD Ù
Y AD Ù - avatar
3 odpowiedzi
+ 3
inpt = int(input())
30th May 2019, 4:38 AM
Diego
Diego - avatar
+ 1
Yea..it worked...but y did putting 'int' made the diffrence
30th May 2019, 8:15 AM
Y AD Ù
Y AD Ù - avatar
0
random.randint returns an int, so input should be an int. ‘6’ == 6 str == int isnt the same as 6 == 6 int == int
30th May 2019, 12:21 PM
Choe
Choe - avatar