Untitled
unknown
python
a year ago
1.2 kB
12
Indexable
from colorama import Fore
file = open("matches.txt", "r")
read = file.readline()
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)
tenCounter = 0
fiveCounter = 0
thousandCounter = 0
fivehundertCounter = 0
lowCounter = 0
privates = 0
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
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