Question: Question 1 (8 points): Purpose: To practice your ability to create and manipulate lists. Degree of Difficulty: Easy Pokemon are fantastic creatures that people like


Question 1 (8 points): Purpose: To practice your ability to create and manipulate lists. Degree of Difficulty: Easy Pokemon are fantastic creatures that people like to catch and train. For this question, you will write a program that allows the user to keep track of the Pokemon they have caught, and then assemble a team from among the Pokemon caught that can be taken to the local Pokemon Gym for training. Your program will have two phases. When the program first starts, it should repeatedly show a prompt to the user asking if they want to catch another Pokemon. Each time they say yes, the program should ask the user to enter the name of the Pokemon that was caught and it should be added to a list variable that holds the user's complete Pokemon collection. When they say no, the program should continue to the second phase. Get this part of the program working before going any further. Do not move on to the second part of the program until you know that the first part works. In the second phase, the program will display the current Pokemon collection, as well as a list of Pokemon that have been added to the user's Gym Team (initially, this second list will be empty). A prompt will then ask the user to name the Pokemon from their collection that they would like to add to the Gym Team. The Pokemon entered should be removed from the first list (the Pokemon collection) and added to the Gym Team list. This process should continue until EITHER (a) there are 6 Pokemon on the Gym Team, or (b) all of the Pokemon from the collection have already been added to the Gym Team. Sample Run Here is an example of how your program's console output might look. Green text was entered by the user. Time to catch some Pokemon! Which Pokemon have you caught? pikachu Would you like to keep catching Pokemon (y)? y So far you've caught : [pikachu ?] Which new Pokemon have you caught? wobuffet Would you like to keep catching Pokemon (y)? y So far you've caught : ['pikachu', 'wobuffet'] Which new Pokemon have you caught? charmander Would you like to keep catching Pokemon (y)? y So far you've caught: ['pikachu', 'wobuffet', 'charmander'] Which new Pokemon have you caught? bulbasaur Would you like to keep catching Pokemon (y)? n Time to head to the Pokemon Gym ! Pokemon in your collection: ['pikachu', 'wobuffet', 'charmander', 'bulbasaur'] Pokemon on your Gym Team: What Pokemon will you add to your team? pikachu I CHOOSE YOU, PIKACHU !! Pokemon in your collection: ['wobuffet', 'charmander', 'bulbasaur'] Pokemon on your Gym Team: [? pikachu ?] What Pokemon will you add to your team? wobuffet I CHOOSE YOU, WOBUFFET!! Pokemon in your collection: ['charmander', 'bulbasaur'] Pokemon on your Gym Team: ['pikachu', 'wobuffet'] What Pokemon will you add to your team? charmander I CHOOSE YOU, CHARMANDER !! Pokemon in your collection: ['bulbasaur'] Pokemon on your Gym Team: ['pikachu', 'wobuffet', 'charmander'] What Pokemon will you add to your team? bulbasaur I CHOOSE YOU, BULBASAUR!! Your Pokemon team is ready to hit the gym! You may assume that the user will enter correct input in all cases, i.e. the user will only try to add Pokemon to the Gym Team that are already in the list. What to Hand In Hand in your solution in a file called a4q1.py. Evaluation 1 mark for missing name, NSID and student number at top of file 1 mark for creating a list type variables 2 marks for correct loop behaviour 1 mark for console input 1 mark for correctly displaying the lists 1 mark for correctly adding a Pokemon to the collection 2 marks for correctly adding a Pokemon from the collection to the team
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
