mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 01:30:22 +00:00
Update, according to comments
This commit is contained in:
@@ -3372,12 +3372,12 @@ Python:
|
|||||||
color: "#3572A5"
|
color: "#3572A5"
|
||||||
extensions:
|
extensions:
|
||||||
- ".py"
|
- ".py"
|
||||||
- ".py3"
|
|
||||||
- ".bzl"
|
- ".bzl"
|
||||||
- ".cgi"
|
- ".cgi"
|
||||||
- ".fcgi"
|
- ".fcgi"
|
||||||
- ".gyp"
|
- ".gyp"
|
||||||
- ".lmi"
|
- ".lmi"
|
||||||
|
- ".py3"
|
||||||
- ".pyde"
|
- ".pyde"
|
||||||
- ".pyp"
|
- ".pyp"
|
||||||
- ".pyt"
|
- ".pyt"
|
||||||
|
|||||||
@@ -1 +1,20 @@
|
|||||||
print("Hello, world!")
|
import random
|
||||||
|
|
||||||
|
guesses = 0
|
||||||
|
|
||||||
|
number = random.randint(1, 20)
|
||||||
|
|
||||||
|
print("Guess the number between 1 and 20! You have 6 tries.")
|
||||||
|
while guesses < 6:
|
||||||
|
guess = int(input("Is it... "))
|
||||||
|
|
||||||
|
if guess == number:
|
||||||
|
print("Hooray! You guessed it right!")
|
||||||
|
break
|
||||||
|
elif guess < number:
|
||||||
|
print("It's bigger...")
|
||||||
|
elif guess > number:
|
||||||
|
print("It's not so big.")
|
||||||
|
guesses += 1
|
||||||
|
if guesses == 6:
|
||||||
|
print("You've ran out of tries.")
|
||||||
|
|||||||
Reference in New Issue
Block a user