dpe1's picture
big chungus license means big chungus holds legal rights to the file called app.py and wahtever.py and the rest is from pokemon.db i have no rights to it and to the best of my knowledge neither does big chungus thank you for your understanding
e0cfb39
raw
history blame
1.67 kB
with open('whatever stuff is neede/all pokemons.txt', 'r') as a: all_pokemons = a.read().split(',')
with open('whatever stuff is neede/evolvable pokemons.txt', 'r') as a: evolvable_pokemons = a.read().split(',')
import csv
with open('whatever stuff is neede/all.csv', 'r') as stone: stone = {i[0].lower():i[2] for i in list(csv.reader(stone, delimiter=","))}
import difflib
if __name__=='__main__':
pokemon = input('Can it evolve?????? ').lower()
stuff = difflib.get_close_matches(pokemon, all_pokemons, n=1, cutoff=0)
if len(stuff)==0: print(f'sry `{pokemon}` pokemon not found (idk why)')
else:
stuff=stuff[0].title()
from difflib import SequenceMatcher as SM
if SM(None, pokemon.title(), stuff).ratio()<0.6: print(f'NOTE idk if u meant {stuff} or not tho but thats the closest match')
if stuff.lower() in stone: print(f'YES {stuff} can evolve: {stone[stuff.lower()]}')
else: print(f'NO {stuff} can\'t evolve')
def isisisisis(pokemon,all_pokemons=all_pokemons, evolvable_pokemons=evolvable_pokemons,stone=stone):
if len(pokemon) ==0: return 'Write pokemons name (it uses fuzzy search)'
stuff = difflib.get_close_matches(pokemon, all_pokemons, n=1, cutoff=0)
if len(stuff)==0: return f'sry `{pokemon}` pokemon not found (idk why)'
else:
stuff=stuff[0].title()
from difflib import SequenceMatcher as SM
#if SM(None, pokemon.title(), stuff).ratio()<0.6: print(f'NOTE idk if u meant {stuff} or not tho but thats the closest match')
if stuff.lower() in stone: return f'YES {stuff} can evolve: {stone[stuff.lower()]}'
else: return f'NO {stuff} can\'t evolve'