GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python/Guess_the_number_game.py at master · TensorUI/Python

Expand file tree

/

Guess_the_number_game.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
41 lines (30 loc) · 774 Bytes
/

Guess_the_number_game.py

Copy path

File metadata and controls

41 lines (30 loc) · 774 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# using codeSkulpter
import simplegui
import random
def new_game():
global num
print("new game")
def range_of_100():
global num
num = random.randrange(0,100)
print("your range is 0-100")
def range_of_1000():
global num
num = random.randrange(0,1000)
print("range is 0-1000")
def input_guess(guess):
global num
print("Your Guess is " , guess)
num1 = int(guess)
if num1 == num:
print("Correct")
elif num1 >= num:
print("Greater")
elif num1 <= num:
print("Lower")
frame = simplegui.create_frame("Guess The Number",200,200)
frame.add_button("range[0-1000)",range1000)
frame.add_button("range[0-100)",range100)
frame.add_input("enter your guess",input_guess,200)
frame.start()
new_game()
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.