Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bff9eb7

Browse files
High_low_game
1 parent 2717a2c commit bff9eb7

File tree

6 files changed

+395
-39
lines changed

6 files changed

+395
-39
lines changed

‎.vscode/settings.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cmake.configureOnOpen": true
3+
}

‎High_Low_Game/art.py‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
logo = """
2+
__ ___ __
3+
/ / / (_)___ _/ /_ ___ _____
4+
/ /_/ / / __ `/ __ \/ _ \/ ___/
5+
/ __ / / /_/ / / / / __/ /
6+
/_/ ///_/\__, /_/ /_/\___/_/
7+
/ / /____/_ _____ _____
8+
/ / / __ \ | /| / / _ \/ ___/
9+
/ /___/ /_/ / |/ |/ / __/ /
10+
/_____/\____/|__/|__/\___/_/
11+
"""
12+
13+
vs = """
14+
_ __
15+
| | / /____
16+
| | / / ___/
17+
| |/ (__ )
18+
|___/____(_)
19+
"""

‎High_Low_Game/game_data.py‎

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
data = [
2+
{
3+
'name': 'Instagram',
4+
'follower_count': 346,
5+
'description': 'Social media platform',
6+
'country': 'United States'
7+
},
8+
{
9+
'name': 'Cristiano Ronaldo',
10+
'follower_count': 215,
11+
'description': 'Footballer',
12+
'country': 'Portugal'
13+
},
14+
{
15+
'name': 'Ariana Grande',
16+
'follower_count': 183,
17+
'description': 'Musician and actress',
18+
'country': 'United States'
19+
},
20+
{
21+
'name': 'Dwayne Johnson',
22+
'follower_count': 181,
23+
'description': 'Actor and professional wrestler',
24+
'country': 'United States'
25+
},
26+
{
27+
'name': 'Selena Gomez',
28+
'follower_count': 174,
29+
'description': 'Musician and actress',
30+
'country': 'United States'
31+
},
32+
{
33+
'name': 'Kylie Jenner',
34+
'follower_count': 172,
35+
'description': 'Reality TV personality and businesswoman and Self-Made Billionaire',
36+
'country': 'United States'
37+
},
38+
{
39+
'name': 'Kim Kardashian',
40+
'follower_count': 167,
41+
'description': 'Reality TV personality and businesswoman',
42+
'country': 'United States'
43+
},
44+
{
45+
'name': 'Lionel Messi',
46+
'follower_count': 149,
47+
'description': 'Footballer',
48+
'country': 'Argentina'
49+
},
50+
{
51+
'name': 'Beyoncé',
52+
'follower_count': 145,
53+
'description': 'Musician',
54+
'country': 'United States'
55+
},
56+
{
57+
'name': 'Neymar',
58+
'follower_count': 138,
59+
'description': 'Footballer',
60+
'country': 'Brasil'
61+
},
62+
{
63+
'name': 'National Geographic',
64+
'follower_count': 135,
65+
'description': 'Magazine',
66+
'country': 'United States'
67+
},
68+
{
69+
'name': 'Justin Bieber',
70+
'follower_count': 133,
71+
'description': 'Musician',
72+
'country': 'Canada'
73+
},
74+
{
75+
'name': 'Taylor Swift',
76+
'follower_count': 131,
77+
'description': 'Musician',
78+
'country': 'United States'
79+
},
80+
{
81+
'name': 'Kendall Jenner',
82+
'follower_count': 127,
83+
'description': 'Reality TV personality and Model',
84+
'country': 'United States'
85+
},
86+
{
87+
'name': 'Jennifer Lopez',
88+
'follower_count': 119,
89+
'description': 'Musician and actress',
90+
'country': 'United States'
91+
},
92+
{
93+
'name': 'Nicki Minaj',
94+
'follower_count': 113,
95+
'description': 'Musician',
96+
'country': 'Trinidad and Tobago'
97+
},
98+
{
99+
'name': 'Nike',
100+
'follower_count': 109,
101+
'description': 'Sportswear multinational',
102+
'country': 'United States'
103+
},
104+
{
105+
'name': 'Khloé Kardashian',
106+
'follower_count': 108,
107+
'description': 'Reality TV personality and businesswoman',
108+
'country': 'United States'
109+
},
110+
{
111+
'name': 'Miley Cyrus',
112+
'follower_count': 107,
113+
'description': 'Musician and actress',
114+
'country': 'United States'
115+
},
116+
{
117+
'name': 'Katy Perry',
118+
'follower_count': 94,
119+
'description': 'Musician',
120+
'country': 'United States'
121+
},
122+
{
123+
'name': 'Kourtney Kardashian',
124+
'follower_count': 90,
125+
'description': 'Reality TV personality',
126+
'country': 'United States'
127+
},
128+
{
129+
'name': 'Kevin Hart',
130+
'follower_count': 89,
131+
'description': 'Comedian and actor',
132+
'country': 'United States'
133+
},
134+
{
135+
'name': 'Ellen DeGeneres',
136+
'follower_count': 87,
137+
'description': 'Comedian',
138+
'country': 'United States'
139+
},
140+
{
141+
'name': 'Real Madrid CF',
142+
'follower_count': 86,
143+
'description': 'Football club',
144+
'country': 'Spain'
145+
},
146+
{
147+
'name': 'FC Barcelona',
148+
'follower_count': 85,
149+
'description': 'Football club',
150+
'country': 'Spain'
151+
},
152+
{
153+
'name': 'Rihanna',
154+
'follower_count': 81,
155+
'description': 'Musician and businesswoman',
156+
'country': 'Barbados'
157+
},
158+
{
159+
'name': 'Demi Lovato',
160+
'follower_count': 80,
161+
'description': 'Musician and actress',
162+
'country': 'United States'
163+
},
164+
{
165+
'name': "Victoria's Secret",
166+
'follower_count': 69,
167+
'description': 'Lingerie brand',
168+
'country': 'United States'
169+
},
170+
{
171+
'name': 'Zendaya',
172+
'follower_count': 68,
173+
'description': 'Actress and musician',
174+
'country': 'United States'
175+
},
176+
{
177+
'name': 'Shakira',
178+
'follower_count': 66,
179+
'description': 'Musician',
180+
'country': 'Colombia'
181+
},
182+
{
183+
'name': 'Drake',
184+
'follower_count': 65,
185+
'description': 'Musician',
186+
'country': 'Canada'
187+
},
188+
{
189+
'name': 'Chris Brown',
190+
'follower_count': 64,
191+
'description': 'Musician',
192+
'country': 'United States'
193+
},
194+
{
195+
'name': 'LeBron James',
196+
'follower_count': 63,
197+
'description': 'Basketball player',
198+
'country': 'United States'
199+
},
200+
{
201+
'name': 'Vin Diesel',
202+
'follower_count': 62,
203+
'description': 'Actor',
204+
'country': 'United States'
205+
},
206+
{
207+
'name': 'Cardi B',
208+
'follower_count': 67,
209+
'description': 'Musician',
210+
'country': 'United States'
211+
},
212+
{
213+
'name': 'David Beckham',
214+
'follower_count': 82,
215+
'description': 'Footballer',
216+
'country': 'United Kingdom'
217+
},
218+
{
219+
'name': 'Billie Eilish',
220+
'follower_count': 61,
221+
'description': 'Musician',
222+
'country': 'United States'
223+
},
224+
{
225+
'name': 'Justin Timberlake',
226+
'follower_count': 59,
227+
'description': 'Musician and actor',
228+
'country': 'United States'
229+
},
230+
{
231+
'name': 'UEFA Champions League',
232+
'follower_count': 58,
233+
'description': 'Club football competition',
234+
'country': 'Europe'
235+
},
236+
{
237+
'name': 'NASA',
238+
'follower_count': 56,
239+
'description': 'Space agency',
240+
'country': 'United States'
241+
},
242+
{
243+
'name': 'Emma Watson',
244+
'follower_count': 56,
245+
'description': 'Actress',
246+
'country': 'United Kingdom'
247+
},
248+
{
249+
'name': 'Shawn Mendes',
250+
'follower_count': 57,
251+
'description': 'Musician',
252+
'country': 'Canada'
253+
},
254+
{
255+
'name': 'Virat Kohli',
256+
'follower_count': 55,
257+
'description': 'Cricketer',
258+
'country': 'India'
259+
},
260+
{
261+
'name': 'Gigi Hadid',
262+
'follower_count': 54,
263+
'description': 'Model',
264+
'country': 'United States'
265+
},
266+
{
267+
'name': 'Priyanka Chopra Jonas',
268+
'follower_count': 53,
269+
'description': 'Actress and musician',
270+
'country': 'India'
271+
},
272+
{
273+
'name': '9GAG',
274+
'follower_count': 52,
275+
'description': 'Social media platform',
276+
'country': 'China'
277+
},
278+
{
279+
'name': 'Ronaldinho',
280+
'follower_count': 51,
281+
'description': 'Footballer',
282+
'country': 'Brasil'
283+
},
284+
{
285+
'name': 'Maluma',
286+
'follower_count': 50,
287+
'description': 'Musician',
288+
'country': 'Colombia'
289+
},
290+
{
291+
'name': 'Camila Cabello',
292+
'follower_count': 49,
293+
'description': 'Musician',
294+
'country': 'Cuba'
295+
},
296+
{
297+
'name': 'NBA',
298+
'follower_count': 47,
299+
'description': 'Club Basketball Competition',
300+
'country': 'United States'
301+
}
302+
]

‎High_Low_Game/main.py‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import random
2+
from art import logo,vs
3+
from game_data import data
4+
print(logo)
5+
count=0
6+
A=random.choice(data)
7+
B=random.choice(data)
8+
9+
while True :
10+
a=A['follower_count']
11+
b=B['follower_count']
12+
print(f"Compare A: {A['name']}, a {A['description']}, from {A['country']}")
13+
print(vs)
14+
print(f"Against B: {B['name']}, a {B['description']}, from {B['country']}")
15+
ans= input('who has more followers ? type A or B')
16+
if ans=="A":
17+
if a>=b:
18+
count+=1
19+
print(f"you are right. current score is {count} ")
20+
data.remove(B)
21+
C=random.choice(data)
22+
B=C
23+
continue
24+
else :
25+
print(f"Sorry , that is wrong . Final score is {count}")
26+
break
27+
else:
28+
if b>=a:
29+
count+=1
30+
print(f"you are right. current score is {count} ")
31+
C=A
32+
A=B
33+
data.remove(C)
34+
C=random.choice(data)
35+
B=C
36+
continue
37+
else :
38+
print(f"Sorry , that is wrong . Final score is {count}")
39+
break
40+
41+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /