Hugh Puddinbustra, Sergei Mnishko, Nariman Varahram

Python Final Assignment

8 June 2017

Zombie Survival - numpy

Purpose

The numpy library is a powerful tool for manipulating arrays. It provides a multidimensional array object, and a slough of tools to manipulate it. Since computer science frequently involves manipulating quantities of data, numpy’s computing efficiency relative to python alternatives, and the additional methods to manipulate data make it valuable to understand. Here, you will sort arrays, change information in arrays, remove elements in arrays, and iterate through elements of an array. These will give you the opportunity to understand the importance of basic numpy methods with a tangible application to the zombie apocalypse.

Provided Starting Materials

You will be given the code to randomly generate names for the survivors, and a code body supplied with hints to help guide you.

Assignment

You are to create a basic simulation for a zombie apocalypse scenario. Each day, a group of survivors (you should have at least a few, and the survivors can simply be arrays) will choose an activity in an attempt to survive. After a certain number of days (you should have at least several), the survivors will encounter an empty bunker filled with supplies that signals the end of their adventure. Before then however, the survivors choose what to do each day. They may (1) rest (details are in the starting code), (2) scavenge for food, or (3) scavenge for medicine. For a bonus, make it so that each day, a standard die is rolled to determine if it is a lucky day. If it is a six, the survivors gain 2 health, and if it is a one, they lose 2 health.

Grading Rubric - Total 100 Points