Movatterモバイル変換


[0]ホーム

URL:


Python Wiki
Don't have an account?
Register
Sign In
Skip to content
Python Wiki
59
pages

A simple number guessing game written in Python.

importrandomf=0num=random.randint(1,100)print"I'm thinking of an number between 1 and 100. Guess it!"whilef==0:# Convert to "input" from "raw_input" to work with 3.xtheGuess=int(raw_input("Your guess: "))iftheGuess==num:print"Great Job!"f=1else:print"Try Again."
Community content is available underCC-BY-SA unless otherwise noted.

[8]ページ先頭

©2009-2025 Movatter.jp