0

Could anyone help me to understand where I made a mistake ?

unexpected indent line 8 https://code.sololearn.com/cIDsiLJb5S8T/?ref=app

17th Apr 2018, 9:25 AM
Lucas
Lucas - avatar
5 Answers
+ 5
Code Playground doesn't have a live console, which means that input and loops won't work well together. import random random.seed() badguess = True number = randome.randint(1,100) while badguess: print('Guess my number from (1-100)') mynumber = int(input()) if mynumber == number: print ('Well done!') badguess = false elif mynumber < number: print ('Your number is smaller than mine') else: print ('Your number is higher than mine') Try running this using an offline Python interpreter.
17th Apr 2018, 12:18 PM
Hatsy Rei
Hatsy Rei - avatar
+ 6
As it tells you, line 8 should not be indented. Line 11 and 13 as well.
17th Apr 2018, 9:50 AM
Hatsy Rei
Hatsy Rei - avatar
+ 5
Is "random" not "randome"
17th Apr 2018, 9:55 AM
Corey
Corey - avatar
+ 1
Thank you!
17th Apr 2018, 2:12 PM
Lucas
Lucas - avatar
0
Ofc random not "randome" (typical when you type on a mobile:) Still can't fix it. When I fix indented fault I then have time limit and programme stays in while loop printing only (Guess my number...) ignoring the rest of it.
17th Apr 2018, 10:18 AM
Lucas
Lucas - avatar