Hi
Below is the code from my first attempted project, it works (its maths based as I am a maths teacher)
If anybody has a few spare minutes I would appreciate someone running it and having a go.
Also, please critique my code, there are probably millions of ways to make it neater
Also, sorry if there is an easier/better way to upload/show code.
Thanks in advance
Nick
Below is the code from my first attempted project, it works (its maths based as I am a maths teacher)
If anybody has a few spare minutes I would appreciate someone running it and having a go.
Also, please critique my code, there are probably millions of ways to make it neater
Also, sorry if there is an easier/better way to upload/show code.
Thanks in advance
Nick
import time my_num = 0 print("Think of a number between 1 and 63") time.sleep(8) print("OK, Lets go.") time.sleep(2) print("Please ensure you answer with a capital Y or N or this program will not work") print("Is your number in the group of numbers below?") time.sleep(2) print("") print("1 3 5 7 9 11 13 15") print("17 19 21 23 25 27 29 31") print("33 35 37 39 41 43 45 47") print("49 51 53 55 57 59 61 63") return1 = input("Y/N?") if return1 == "Y": my_num = my_num + 1 time.sleep(2) print("") print("") print("Is your number in this group of numbers ?") time.sleep(2) print("") print("2 3 6 7 10 11 14 15") print("18 19 22 23 26 27 30 31") print("34 35 38 39 42 43 46 47") print("50 51 54 55 58 59 62 63") return2 = input("Y/N?") if return2 == "Y": my_num = my_num + 2 time.sleep(2) print("") print("") print("Is your number in this third group of numbers ?") time.sleep(2) print("") print("4 5 6 7 12 13 14 15") print("20 21 22 23 28 29 30 31") print("36 37 38 39 44 45 46 47") print("52 53 54 55 60 61 62 63") return3 = input("Y/N?") if return3 == "Y": my_num = my_num + 4 time.sleep(2) print("") print("") print("Half way there. Is your number in this group of numbers ?") time.sleep(2) print("") print("8 9 10 11 12 13 14 15") print("24 25 26 27 28 29 39 31") print("40 41 42 43 44 45 46 47") print("56 57 58 59 60 61 62 63") return4 = input("Y/N?") if return4 == "Y": my_num = my_num + 8 time.sleep(2) print("") print("") print("One more after this one. Is your number in this group of numbers ?") time.sleep(2) print("") print("16 17 18 19 20 21 22 23") print("24 25 26 27 28 29 30 31") print("48 49 50 51 52 53 54 55") print("56 57 58 59 60 61 62 63") return5 = input("Y/N?") if return5 == "Y": my_num = my_num + 16 time.sleep(2) print("") print("") print("Last one. Is your number in this group of numbers ?") time.sleep(2) print("") print("32 33 34 35 36 37 38 39") print("40 41 42 43 44 45 46 47") print("48 49 50 51 52 53 54 55") print("56 57 58 59 60 61 62 63") return6 = input("Y/N?") if return6 == "Y": my_num = my_num + 32 print("") print("") print("") print("OK, let me think...") time.sleep(10) print("I think the number you thought of was ...") print(str(my_num)) time.sleep(10) print("") print("") print("") print("I dont know how to end my coding, so it is just pausing. This message will self destruct in 10 seconds") time.sleep(10)