PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#type a number
di=True
for att in range(1,4):
a=int(input("Attempt"+str(att)+":"))
if 1<=a and a<=10:
print("Yay you did it!")
di=False
break
else:
print("Bad attempt")
if di:
print("you failed to do the task")
else:
print("good you knew the task well")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run