Last active
February 26, 2016 04:05
-
-
Save ghostlyman/4873ba0e1b09a99cf738 to your computer and use it in GitHub Desktop.
Revisions
-
ghostlyman renamed this gist
Feb 26, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ghostlyman created this gist
Feb 26, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ #!/usr/bin/env python #Filename: Python_Course01_Q02_Gambling.py #This script is used for gambling an integer within 3 times. print('Hi, you have 3 times to guess the integer') INTEGER = 68 for i in range(3): i = int(input('Please enter an integer: ')) if i > INTEGER: print('Please guess a small one.') elif i < INTEGER: print('Please guess a big one.') elif i == INTEGER: print('Congratulation! You Win!') print('Oops! You fail!')