Hello guys today I will be showing you how to make a simple game with Python on iOS .
Requirements:
-device running iOS
- pythoni , you can get it from the App Store .
It is free.
In this tutorial I will be using pythoni .
And a last thing guys before I start : in this tutorial I will be not using hidden contents but if you have an account you can press the thanks button .
Remember that you can change some things and modify the game , in a certain way I will hack.????
So now the code , I recommend you to copy and paste it on pythoni in the section Python or script and not in console.
import random
secret = random.randint(1,50)
tipp = 0
essays = 0
print "hello my name is fred and i have a secret , it is a number between 1 and 50 . you have 4 essays"
while tipp != secret and essays < 8:
tipp = input("So what are you saying:")
if tipp < secret:
print "not enough:"
elif tipp > secret:
print "too high:"
essays = essays + 2
if tipp > 50:
print "this is not a number between 1 and 50."
if essays == 8:
print "Sorry you lost"
print "my secret was :", + secret
if tipp == secret:
print "Congratulation you won"