Ask coding questions

← Back to all posts
Please look at my code ! i need suggestion weather the code is fine or needs any improvement.
SouravSaha1

import random
from art import logo
from art import vs
from game_data import data
import os
os.system('clear')

global point
point=0
def game():
print(logo)
global point

print(f"Your point is :{point}")
def compare(first):
para=random.choice(data)
global followers
name=para['name']
occup=para['description']
place=para['country']
followers=para['follower_count']
print(f"Compare {first.upper()}:{name},a {occup},from {place}")

compare("a")
A=followers
print(A)
print(vs)
compare("b")
B=followers
print(B)
guess=input("Who has more followers?: 'A','B': ").upper()
if guess=='A':
if A<B:

if guess=='B':
if B<A:
print(f"wrong answer!final points:{point}")
else:
point+=1
print(f"right {point}")
os.system('clear')
game()
game()

Voters
SouravSaha1
Comments
hotnewtop
VulcanWM

This is nice! A recommendation, instead of listing all of the stats maybe web scrap them from a website so you don’t have to type in all of them and you have an accurate count