Question
Purpose: Practice with getting data from functions. Some basic numerical problem-solving (python programming language) Degree of Difficulty: mod Minecraft is an open-world video game based
Purpose: Practice with getting data from functions. Some basic numerical problem-solving (python programming language)
Degree of Difficulty: mod Minecraft is an open-world video game based on placing and interacting with 3D textured blocks. If you are not familiar with the game, each player has a personal inventory which can hold a limited number of blocks and items. Specific blocks and items can be combined on a crafting table to form new items. For example, three wheats arranged in a horizontal line on a crafting table gives the player one loaf of bread. These combinations are known as crafting recipes and the game has hundreds of them. This question deals with the recipe for making a cake. One cake requires 1 egg, 2 sugars, 3 wheats and 3 buckets of milk. Your job is to build a program to help the player determine how many cakes they can make based on the number of ingredients that they have. Figure 2: A screenshot from Minecraft showing a crafting table showing the recipe for making a cake. Your program wont make this picture, this is just showing you the rules for making a cake! Most items in the players inventory such as sugar and wheat can be stacked in groups of 64. This allows the player to store 64 of the same item in one inventory slot. Some items such as eggs can only be stacked in groups of 16. Finally, items like buckets of milk cannot be stacked; each bucket of milk occupies one inventory slot. Here is a description of WHAT your program should do when its finished: Pressing the "e" key/"r" key increases/decreases the number of STACKS of eggs available by one. Pressing the "s" key/"d" key increases/decreases the number of STACKS of sugar available by one. Pressing the "w" key/"q" key increases/decreases the number of STACKS of wheat available by one. Pressing the "m" key/"n" key increases/decreases the number of individual buckets of milk available by one. Display the current number of eggs, the current number of sugar, the current number of wheat and the current number of milk available. Display the number of cakes the player could possibly make given the amount of raw ingredients. Some examples: If you have 1 stack of eggs (16 eggs total), 1 stack of sugar (64 sugars total), 1 stack of wheat (64 wheats total) and 3 buckets of milk, you can only make 1 complete cake before you run out of milk. If you have 2 stacks of eggs (32 eggs total), 3 stacks of sugar (192 sugars total), 2 stacks of wheat (128 wheats total) and 150 buckets of milk, you ca
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