filmov
tv
Python Tutorial v3.2.5 Lesson 24.3 - Discarding Items and Inventory Limit

Показать описание
1:22 Skip the Introduction to Lesson 24.3
2:23 Skip to the if statement that handles inventory limits.
7:22 Skip to building the redesigned throw_away() function.
The is no Challenge Program for Lesson 24.3.
Lesson 24.3 continues the development of the small, text-based game initially developed in Lesson 24.1 and 24.2. Building on functionality added previously, this video starts by adding a small inventory control on the game. This limits the user to having, at most, 5 rocks in their inventory. Then, the video turns it's attention to the discarding items mechanic. When a player chooses to discard an item, they are given a menu that includes only items that are currently in their inventory.
(NOTE: Some of these functions would be more appropriate with a for loop, but since that topic has not been addressed by this tutorial series at this time, all functions are build using only simple list methods).
This is an introductory series of Python tutorials. This course, from start to finish, is designed to help someone who has never programmed before learn the basics of coding in Python. As this series continues, we examine more advanced Python techniques, functions, and methods.
Keep in mind this tutorial is using an older version of Python, v3.2.5. You will need to click on the "View Older Releases" button to use this specific version. Using the newer versions will not be an issue at this point, but when the lesson proceeds to basic graphics, the Pygame Module we'll use does not support v3.3+ at this time.
2:23 Skip to the if statement that handles inventory limits.
7:22 Skip to building the redesigned throw_away() function.
The is no Challenge Program for Lesson 24.3.
Lesson 24.3 continues the development of the small, text-based game initially developed in Lesson 24.1 and 24.2. Building on functionality added previously, this video starts by adding a small inventory control on the game. This limits the user to having, at most, 5 rocks in their inventory. Then, the video turns it's attention to the discarding items mechanic. When a player chooses to discard an item, they are given a menu that includes only items that are currently in their inventory.
(NOTE: Some of these functions would be more appropriate with a for loop, but since that topic has not been addressed by this tutorial series at this time, all functions are build using only simple list methods).
This is an introductory series of Python tutorials. This course, from start to finish, is designed to help someone who has never programmed before learn the basics of coding in Python. As this series continues, we examine more advanced Python techniques, functions, and methods.
Keep in mind this tutorial is using an older version of Python, v3.2.5. You will need to click on the "View Older Releases" button to use this specific version. Using the newer versions will not be an issue at this point, but when the lesson proceeds to basic graphics, the Pygame Module we'll use does not support v3.3+ at this time.
Комментарии