Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 65 additions & 11 deletions Other Programs/Countries.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,74 @@
country = "Spain"
import random
import time
randomcountry = random.randint(1,10)
wrongguesses = 0
if randomcountry == 1:
country = "Spain"

if randomcountry == 2:
country = "US"

if randomcountry == 3:
country = "UK"

if randomcountry == 4:
country = "Poland"

if randomcountry == 5:
country = "France"

if randomcountry == 6:
country = "Australia"

if randomcountry == 7:
country = "Italy"

if randomcountry == 8:
country = "Portugal"

if randomcountry == 9:
country = "Finland"

if randomcountry == 10:
country = "Scotland"

print("In this program you will need to guess the country I am thinking of")
print("I am thinking of a country between London and Japan")

while True:
guess = input("Enter your guess: ")

if guess == "UK":
print("That's not right :(")

elif guess == "Poland":
print("That's not right :(")
if guess.lower() != country.lower():
randomphrases = random.randint(1,5)
wrongguesses = wrongguesses + 1
if randomphrases == 1:
print("Interesting guess, but not quite!")
if randomphrases == 2:
print("That's not right :(")
if randomphrases == 3:
print("Nice guess, but it's not this one.")
if randomphrases == 4:
print("Nah")
if randomphrases == 5:
print("Wrong guess")
if guess.lower() == country.lower():
wonrandomphrases = random.randint(1,4)
if wrongguesses > 5:
print("It's not that one you noob")
time.sleep(2)
print("Nah just kidding you got it right")
input()

elif guess == "Spain":
print("Your guess is correct!!")
break
if wonrandomphrases == 1:
print("You won!")
input()
if wonrandomphrases == 2:
print("Congratulations, you guessed it right")
input()

if wonrandomphrases == 4:
print("GGs, you guessed it right")
input()


else:
print("Interesting guess, but not quite!")