`

#Author : Bikash Guragai
#versione : 1.0
#email : bikashguragai@gmail.com or bikashguragai@programmer.net

import random

print ("Hello and welcome")

Name = input("What is your name: ")
print ("Nice to meet you",Name)


ok = input("Click enter to move on")

play = input("Lets play a game")


b = input("Think of any Any number")

c = input("Add that number by it self")
g = random.randint(1,50) 
print ("Now add",g) 
ans = g/2 
h = input("Now divide that number by 2")  
i = input("Now Subtract that number by the number you guessed at first") 
print("your number answer is",ans)

Again = input("Did you like this game yes or no: ")


if Again == "no":
    exit()

else:
    print("Share this to your friends")
    print("Thank you")

`

That is very simple math. Try to see if you can come up with something more complex(You should tell the user that they can use a caculator.) Also in line 34 what if the answer is "1221" or somthing random like that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.