Untitled

 avatar
unknown
plain_text
6 months ago
1.3 kB
5
Indexable
from colorama import Fore

file = open("matches.txt", "r")

tenCounter = 0
fiveCounter = 0
thousandCounter = 0
fivehundertCounter = 0
lowCounter = 0
privates = 0

for line in file:
    parts = line.split("|")
    for part in parts:
        if "Matches:" in part:
            matches_str = part.replace("Matches:", "").strip()
            matches_int = int(matches_str)
            
            if matches_int > 10000:
                tenCounter += 1
            elif matches_int > 5000:
                fiveCounter += 1
            elif matches_int > 1000:
                thousandCounter += 1
            elif matches_int > 500:
                fivehundertCounter += 1
            elif matches_int > 0:
                lowCounter += 1
            else:
                privates += 1

file.close()


while True:
    print(f"""
 {Fore.LIGHTWHITE_EX}+10k Matches: {Fore.LIGHTGREEN_EX}{tenCounter}
 {Fore.LIGHTWHITE_EX}+5k Matches: {Fore.LIGHTGREEN_EX}{fiveCounter}
 {Fore.LIGHTWHITE_EX}+1k Matches: {Fore.LIGHTGREEN_EX}{thousandCounter}
 {Fore.LIGHTWHITE_EX}+500 Matches: {Fore.LIGHTGREEN_EX}{fivehundertCounter}
 {Fore.LIGHTWHITE_EX}Less than 500 Matches: {Fore.LIGHTGREEN_EX}{lowCounter}
 {Fore.LIGHTWHITE_EX}Private: {Fore.LIGHTGREEN_EX}{privates}
    """, end="\r")
Editor is loading...
Leave a Comment