How to do flowchart for this coding? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to do flowchart for this coding?

import random pokemon_list = ['Zubat','Eevee','Flamingo','Pikachu'] n=[1,2,3] print('Hello, welcome to Pokemon Go ') name = input('Create your name: ') age = int(input('Enter your age:')) ans = input('Are you ready to play (yes/no): ') ball = 5 point = 0 if ans == 'yes': while ball!=0 : print('\nYou have been given',ball,'pokeball, begin your adventure now?') enter1 = input('Press enter to continue>> ') pokemon=random.choice(pokemon_list) if enter1 == '': print('A wild', pokemon, 'appeared!') if pokemon == 'Zubat': encounter = 3 if pokemon == 'Flamingo': encounter = 2 if pokemon == 'Eevee': encounter = 5 if pokemon == 'Pikachu': encounter = 1 ball -= 1 enter2 = input('Press enter to continue >>') if enter2 == ''

13th Mar 2022, 12:26 PM
CML
CML - avatar
0 Resposta