0
Could anyone help me to understand where I made a mistake ?
unexpected indent line 8 https://code.sololearn.com/cIDsiLJb5S8T/?ref=app
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.
+ 6
As it tells you, line 8 should not be indented. Line 11 and 13 as well.
+ 5
Is "random" not "randome"
+ 1
Thank you!
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.