IB Comp Sci SL - November 21 2016 Lesson Notes: Difference between revisions

From Computer Science Wiki
Line 17: Line 17:
==[[file:homework.png]] Homework ==
==[[file:homework.png]] Homework ==


# none
A common mechanic in computer games is to simulate a dice roll. [http://product-images.highwire.com/2370673/gray-opaque-rpg-dice.jpg Please click here to see an image of different types of dice]. Please write a function that rolls dice for you and RETURNS the result.
 
  for example: roll_dice(d6,3) <-- would roll a six sided die 3 times and return the result
  for example: roll_dice(d12,1) <-- would roll a 12 sided dice 1 and return the result
  for example: roll_dice(d20,4)  <-- would roll a 20 sided die 4 times and return the result.
 
  You should model a 4 sided, 6 sided, 10 sided, 12 sided, and 20 sided die.
 
  As extra-credit, you might want to return the result of each roll and then the final total.
  for example: roll_dice(d6,3) <-- might return 6 3 1 10
 


</td>
</td>

Revision as of 10:24, 21 November 2016

Class plan.png What are we going to learn today?[edit]

  1. Today we will review the system design exam
  2. We will learn about functions
  3. We will review diagramming systems, a point of weakness in our exam
  1. Draw and label a system flowchart to represent some processes.

Homework.png Homework[edit]

A common mechanic in computer games is to simulate a dice roll. Please click here to see an image of different types of dice. Please write a function that rolls dice for you and RETURNS the result.

 for example: roll_dice(d6,3) <-- would roll a six sided die 3 times and return the result
 for example: roll_dice(d12,1) <-- would roll a 12 sided dice 1 and return the result
 for example: roll_dice(d20,4)  <-- would roll a 20 sided die 4 times and return the result. 
  You should model a 4 sided, 6 sided, 10 sided, 12 sided, and 20 sided die. 
 As extra-credit, you might want to return the result of each roll and then the final total. 
 for example: roll_dice(d6,3) <-- might return 6 3 1 10


Target.png How am I being assessed today?[edit]

  1. You will be formatively assessed in class today

Ourstandards.png Standards we are covering today[edit]

  • Construct suitable representations to illustrate system requirements
  • Describe appropriate techniques for gathering the information needed to arrive at a workable solution.
  • Click here for all our standards

Computer1.png As a computer scientist, you have:[edit]

  • Confidence in dealing with complexity
  • Persistence in working with difficult problems
  • Tolerance for ambiguity
  • The ability to deal with open-ended problems
  • The ability to communicate and work with others to achieve a common goal or solution

Credit.png Credits[edit]