Intro CS 2013-14

Unit 5



Unit 4: Python Basics

  • codecademy1 : Python :
  • Unit Goals:
    • creating variables
    • assigning and using values of variables in python
    • Syntax basics
      • indentation
      • using colons “:”
    • control structures
      • if/else
      • if/elif/else
      • while loops
      • for loops
    • Strings, dates and other datatypes

Quarter I : Alice


Unit 3: Control Structures

  1. packets 12- 14

Unit 2 Functions vs Methods and Timing

  • Deadlines
  • Test: Monday november 4th
    • converting non decimal numbers to decimal numbers
    • basic definitions of variable, boolean, string etc..
    • translate python code to English
    • state output of python code
  •  Projects: Friday November 1
  • Due date Deadline:   Friday November 8th
  • Packets #8 – #11
  • Magic Cookies 1 : Create a world that has a plate of four cookies. (See the Kitchen collection). The world should also have four empty plates. When the world is played, the cookies should magically levitate one by one, float to one of the empty plates, and then land on the empty plate. When finished, each of the four plates that were initially empty should have a cookie. (Due by end of Tuesday)
  • Magic Cookies 2 :Modify the Magic Cookies 1 project so that the cookies simultaneously float to and land on the empty plates.
  • Drag Racing: Create a world with a road (from the City collection) and two cars (from the Vehiclescollection). Resize the road as necessary to match the size of the cars. The cars should be lined up side by side at one end of the road, which is a drag strip. When the world is played, the cars should simultaneously move to the other end of the road and stop(You must use “do together). Change the duration of the method call that you use to move one of the cars so it is faster than the others. Position the camera so you can see the cars as they approach the end of the drag strip. Put an object at the end of the race to signify the ‘finish line’ and use a function to move the cars to the end.
  • Apollo 15 : During the Apollo 15 mission to the moon, astronaut David Scott performed an experiment to prove that Galileo was right when he said that any two objects dropped at the same time would land on the ground at the same time in the absence of air. Scott, standing on the surface of the moon, dropped a hammer and a feather and indeed both objects hit the ground simultaneously.(Again, you must use “do together”) Create an Alice world that recreates the experiment. You will find classes for the astronaut, lunar Lander, and the moon’s surface in the Web gallery’s Space collection. You can find a class for the Hammer in the Objects collection. Substitute any object of your choice for the feather. Use a function to make the objects fall the distance to the ground.
  • Space Ship Repair : Create a space world with an astronaut and two spaceships(from the Web gallery’s Space collection). One of the spaceships is stranded with engine trouble, and the astronaut has arrived in the other spaceship to perform a repair. The astronaut should initially be positioned just outside one of the spaceships, about to perform a space walk to the other ship. When the world is played, the astronaut should initially be positioned just outside one of the spaceships, about to perform a space walk to the other ship. You must use a function to determine how far the astronaut must walk. When the world is played, the astronaut should float to the stranded spaceship, appear to work for a few moments, and then float back to the rescue ship. The repaired ship should then fly away, off the screen.
  • If you want to get that A in this class, complete this project:
    • do an open project that makes use of
      • 2 functions (you may use a distance function for one of them)
      • 3 objects
      • do together
      • variable
  • Penguin on a Table: Create a world with a penguin and a table. The penguin should be facing the table, standing next to it. The penguin should simultaneously flap its wings (use the wing_flap method) and move up in the air a distance that is exactly 1 meter higher than the height of the table. You can call the table’s height function to get its height. The penguin should then move forward to approximately the center of the table, and then move down to the surface of the table

Unit I. Objects, Classes, Methods and Properties!

Theme of object vs Class

Classes Objects
(be able to define) Specific ‘real’ examples that in programs
Templates for creating objects defined by specific properties like having a red color
a blue print for creating objects First letter is lower case ex myCoach
First Letter is Capitalized ex Coach

Complete Handouts #1, #2
Packed #2 HUGE year long concept : Objects and Classes
I cannot emphasize enough the importance of a class and an object. These simply will not go away and are the basis for all Object Oriented Programming languages including Java , C++, PHP and Flash’s Actionscipt 3.
Packet #3. Complete Tutorial 1-2.
Packets #4 – #6
Project #1)After you are done with packet #6, complete your first mini program. The requirements
Due Friday (10/1 , hand in by 10/8)
At least 10 instructions
modify a ‘subpart’
1 do-together statement
at least 3 different objects
Worth 7 points. To get a 7/7 you must achieve the ‘wow factor’–ie go above and beyond to create a superior final project
Quiz #1

Tuesday October 3

Notes in Dropbox should offer excellent practice and guidance as to what will be on quiz.

binary numbers (converting to decimal etc)
non decimal numbers( converting to decimal etc..)
Class vs object (as discussed in class)
Naming conventions : camel vs pascal