-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (26 loc) · 1.01 KB
/
main.py
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
import random
import art
from game_data import data
print(art.logo)
print("\nWelcome to the Higher Lower game of Instagram followers!")
print("Note: This data is based on the account's followers as on the end of 2020.")
answer_is_right = True
score = 0
option1 = random.choice(data)
while answer_is_right:
option2 = random.choice(data)
if option1['follower_count'] > option2['follower_count']:
correct_answer = 'a'
else:
correct_answer = 'b'
print(f"\nCompare A: {option1['name']}, a {option1['description']}, from {option1['country']}.")
print(f"\nAgainst B: {option2['name']}, a {option2['description']}, from {option2['country']}.")
answer = input("\nWho do you think has more followers? Type 'A' or 'B': ").lower()
print("------------------------------------------------------------")
if not answer == correct_answer:
answer_is_right = False
print(f"Sorry, that's wrong. Final score: {score}")
else:
option1 = option2
score += 1
print(f"You're right! Current score: {score}.")