Python Tutorial - Your First Program

Gary Explains
Gary Explains
If you want to get into computer programming, one easy way is to use Python. Here is a quick tutorial which will show you how to ...
If you want to get into computer programming, one easy way is to use Python. Here is a quick tutorial which will show you how to get started with Python programming on Windows.

Twitter: Twitter: garyexplains
Instagram: Instagram: garyexplains

####
import random

n = random.randint(1,10)
print("I am thinking of a number between 1 and 10")

running = True
while running:
   guess_str = input("Take a guess ")
   guess = int(guess_str)
   if guess == n:
       print("Well done, that is right!")
       running = False
   elif guess <  n:
       print("Try a bigger number")
   else:
       print("Try a smaller number")

#####

---
Python Tutorial for Beginners
Introduction to Python Programming
Learn Python
Python for Windows
---

همه توضیحات ...