ICS3U Culminating Activity

Instructions

These ICS3U Grade 11 Computer Science python coding questions will form a part of your final grade for this course and are to be handed in for grading. 

  • Use a Python IDE of your choice (Spyder, IDLE, Pycharm, etc) and create a coded solution to all the given problems.
  • Hand in commented .py files for your solutions
  •  The design of your solutions MUST be modular. You have create functions to solve the problems
  • Demonstrate that you have used the INPUT –  PROCESSING – OUTPUT Problem Solving Process and that you have Evaluated your solution for Question 1 only (You must hand in this evidence (pictures / screen shots)

Your grade will be based on your ability to demonstrate the overall expectations from the Ontario Computer Studies Curriculum

A1 – Data Sequencing 

  • Use variables to carry out mathematical calculations in a computational problem
  • incorporate one dimensional arrays into a computer program

A2 – Selection and Repetition Structures

  • Incorporate selection structures into a computer program.
  • Incorporate repetition structures into a computer program

A3 – Modular Programming

  • Write custom subprograms that pass parameters and return results

A4 – Code Maintenance

  • Write code that is readable using proper naming, indenting, and commenting conventions
  • Test program thoroughly to identify and correct errors

B1 – Problem Solving Strategies

  • Incorporate the Input – Processing – Output model of problem solving

B2 – Planning

  • Describe the structure of a program using pseudocode or flow charts

B3 – Algorithm Design

  • Design and implement algorithms that solve problems

ICS3U Python Culminating Question #1

File Name: “ICS3UmultiplierGame.py”

Description

  • An amusement park is looking for ways to entertain its guests while they wait in line for a very popular ride. They have an idea in mind for a game that could be played while people wait and would like to hire you to create the software for the game. The game will have the player earn points which can then be traded in for a prize after the ride has finished.
  • The player starts the game with an “account” with 0 points in it. The game consists of 5 rounds of play where the amount of points earned from each round is added to the account. After the 5 rounds are over the player can withdraw all of the points in his account

For Each Round of Play

  • He player rolls two dice and records the sum.This represents the number of points he earns. One dice has 9 sides the other dice has 6 sides.
  • The player keeps rolling the two dice and continuously adds the points from the new roll to the points he has already accumulated in that round. There are however both incentives and punishments for rolling the dice too many times.
  • The player can continue rolling the dice as many times as he wishes during a round and can “bank” his points to his account at any time he wants, thus starting a new round.

Incentives For Continuing To Roll

  • If you bank to your account a total of at least 50 points in a single round, you will double the points that sit in the account after the round is complete
  • If you bank to your account a total of at least 75 points in a single round, you will triple the points that sit in the account after the round is complete
  • If you bank to your account a total of at least 100 points in a single round, you will quadruple the points that sit in the account after the round is complete
  • If you roll double 6’s at least 5 times in a single round, you will increase the points that sit in the account after the round is complete by 20 times

Punishments For Continuing To Roll

  • If you roll a 1 on either dice at any point during the round your total points for the round get reset to zero (You can keep rolling in the round)
  • If you roll a sum of 7 then the amount of points you currently have in the round is cut in half (round up) (You can keep rolling in the round)
  • If you roll a snake eyes (Both dice show 1) at any point during the round your total points for the round get reset to zero and your account balance gets reset to zero. (You can keep rolling in the round)

Prize System

  • When the game ends the player will have a specific number of points that can be traded in for prizes.
  • There should be 6 possible prizes each needing a different number of points. You will need to test your game multiple times to determine a reasonable amount of points needed for each prize.
  • The better the prize the more points it should cost
  • The player can pick as many prizes as he wants as long as he has enough points to pay for all of them. You should display the maximum amount of each prize the player can pick and update that # as he picks prizes

Statistics

Store and display the following information at the end of the game

  • The total number of rolls and the points banked for each of the 5 rounds
  • A horizontal bar graph of *’s representing the total number of each possible sum (2 – 15) that was rolled in the entire game. Scale the amount of stars displayed so that it would fit on the screen