Question
This is for my python text adventure game! Need help 1. Create a list called itembag, and have it contain one element called healthpotion, and
This is for my python text adventure game! Need help
1. Create a list called itembag, and have it contain one element called "healthpotion", and add three other items of your choosing. Do this so that you have at least 4 elements in that list.
2. Make a function or sequence of code so that every time someone types in the word "item" (or picks a number if you are using numbers) it displays all the contents of the itembag list.
3. Create a new list called weapons. This list should contain two default items: "sword" and "leather armor"
4. Make a decision or move to a room somewhere in your game. When this happens, you player will have found a new sword! The "steelsword". Delete the "sword" from the list, and replace it with the steelsword.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started