Intro to Computer Science 2014-15

Intro to CS Class Page

Quarter 3



  • Due Feb 3)  Jumping Jacks Add a jumpingJack method to the ExerciseGirl class. The method should make the object perform jumping jacks.
    • Important: this method should have a parameter  called repsDone for the number of repetitions to perform.
    • Be sure to increment the repsDone property after each repetition.
  • Due Feb 5 ) Marcello The Magician: Marcello the magician has finally mastered his disappearing act. To perform the act, he places several items on a table in front of him. He stands with his right arm extended over an item. He says the magic word “Alakazam, Alakazee” and the object disappears. He repeats this procedure for each object on the table. Create a world in which Marcello (an instance of the Magician class from the People Collection) demonstrates his new act . In the magician object
    • you should create two new class-level methods:
      • sayMagicWords
        • should cause Marcello to say the magic words.
      • makeDisappear
        • should cause Marcello to turn to face the object, say the magic words (by calling the sayMagicWords method) and then make the object disappear by setting its isShowing property to false.
  • due Feb14th ) Marcello The Magician Modification: Marcello has learned a few new trick;
    • Write a levitate method that takes an object parameter. This method causes the object to levitate in the air.
    • he has learned how to turn anything into a cow! Create a new method called transforToCow that takes an object parameter , and  this method takes an object parameter. this method ‘changes’ the object to a cow by 1) hiding the object and 2) putting a cow where that object was. To do this second part, you can simply have a cow hidden off the screen and place it where the object was.
  • Due Thurs February 26th Complete the final packets
  • Feb break 9-13dth of feb
  • Monday/Tuesday March 2nd/3rd: Final Alice project
    • Use the event methods that you learned in the last packets. Create some kind of game.  You game must make use of 3 of the following 4 things
      1. parameter
      2. saving a class to a file
      3. events
      4. function return value
  • note, for this last project, you cannot just make random stuff happen. To get full credit, create a coherent story or game.
  • a






Quarter 2

In Class Midterm

When January 21/22  (wed/thurs)

  • binary and other non decimal numbers
  • all alice topics covered on first test (functions, methods, return value, variables and variable types)
  • predict output of pseudocode
  • Short Circuiting
  • Truth Tables  / *Demorgans Law (This will not be on midterm)

Unit 4: Logic continued, pseudocode, parameters

  • Packets 20, 21, 22 : Due by return from vacation
  • Due January 7/8 Assignment 1 Exercise Competition:
    Three girls Jenny, Kelly, and Barb are enrolled in an exercise class. One day after class the three decide to have a friendly competition to see how many sets of 10 repetitions of running in place each can do before getting tired. Barb decides to go first and gets tired at10 repetitions. Kelly goes next and she gets tired at 20 repetitions. Jenny, who has been in the exercise class for the longest, goes next. She gets tired at 30 repititions.
    Create a world that suites the competition.

    • create a getsTiredAt property as a number variable
    • Set each girls getsTiredAt property to the appropriate value so the girls get tired at the correct number of repetitions
    • Important: Each of the girls should be an instance of ExerciseGirl class that you created in chapter 5.

Unit 3: Loops and advanced if/else

NOTE: All assignments from UNIT 3 must be completed before Winter Holiday is over. The open assignment cannot be handed in after that time.


Assignment 1) Complete packets 15 b, 16, 18


Assignment 2 ) Roman Numeral translator Due Tues/wed the 9th/10th
Objective : to let the user type in a number between 1 and 10 and then have a character “translate” that into Roman Numerals ( I, II, III, IV, V, VI, VII, VIII, IX, X)

  • Ask the user for a number and store the return value into a variable called  numberToTranslate
  • if the user enters a number greater than 10 then  OR less than 1 , have your character say, use either a or b “Only enter numbers between 1 and 10”screenshot59



  • use a series of “if/else tests to translate the number and say the write translation for each number between 1 and 10
  • screenshot61

We are going to use the roman Numeral Translator file again, so it’s important that you don’t lose the file and give it a good name that you can easily recognize in the future.


Assignment 3)  FanLoop Modification: Modify the FanLoop world on the Student CD so it asks the user for the number of times the fan blades should rotate. Use this value in the Loop statement to control the number of times the roll method is called. Due Tues/wed the 11th/12 th



Assignment 4) Sea Plane Loop-the-Loop : Create a world with a sea plane (from the Vehiclescollection).Create an infinite loop that causes the sea plane to do a circular loop the loop. Adjust the style and duration editing tags to make the animation fast, and as smooth as possible.



Assignment 5)  

 A)  Centigrade to Fahrenheit Modification: Modify the Fahrenheit to centigrade project as follows. Due Tues/wed the 16th/17th

  1. At the start, ask the user how many temperatures they want to convert.
  2. Then use a loop to do that many conversions

B) Miles Per Gallon Modification: Modify the miles per gallon project in the same way as the prior exercise.Due wed/Thurs the 17th/18th

  1. At the start, ask the user how many mpg conversions,  they want to convert.
  2. Then use a loop to do that many conversions

Assignment 6) Open assignment. Your open project must have each of the following criteraDue before Winter vacation

  1. a variable
  2. store the return value of a function into that variable
  3. a loop of some kind



 Unit 2

All  Unit 2 assignments are due by 12/4 or 12/5

**Assignment 7-extra credit ). Look up the formulas for the volume and surface area of a cylinder . Ask the user for the height of the cylinder and the radius, which should be stored in variables. Then calculate the surface area and volume of the cylinder . See if there is a cylinder shape in the gallery to use as a visual aid.

Assignment 6) Circle’s Area and Circumference: Create a world with your choice of person from the Peoplecollection. When you play the world, it should

  • ask the user for the radius of a circle. (This value should be stored in a variable ).
  • The person should then say the area and the circumference of the circle.( Links for the circumference formula , area of a circle)
  • (For an extra point do the same thing with a “Sphere“. Ask the user for the radius and calculate the surface area and the volume.

Assignment 5) Modification of Fahrenheit to Centigrade

reopen the Fahrenheit to Centigrade project and add

  • if the degreesCentigrade  variable <30
    • say “It’s Very cold
  • else
    • say ” It is warm outside”

Assignment 4) Modification of MPG

reopen the miles per gallon project

  • if the MPG variable <  20
    • say “What a Gas Guzzler”
  • else
    • say ” Your car is not a gas guzzler”

Assignment  3) Fahrenheit to Centigrade :  Due 11/28 or 11/30 

  • Create a variable called degreesFahrenheit  .
  • Store the return value of the ask user to enter a number function
    • You should ask them for the degrees in Fahrenheit
  • Create a variable called  degreesCentigrade
  • Use the following formula to convert the degreesCentigrade   to Centigrade  Fahrenheit temperature to Centigrade  using the following formula
  • use a character from thePeople collection to say the centigrade temperature.
  • Don’t forget that you can’t say numbers, you must use what as a string


Assignment 2 )  Due 11/25 or 11/26 (depending on your section) Miles Per Gallon: Create a world in which the

  •  Create 3 variables :  miles, gallons ,MPG  
    •  2 of the variables  store the return value of a function
      • The user is asked for the number of gallons  of fuel his or her car can hold. Use the return value of the ask use for a number function as shown below.screenshot21
      • Do the same thing for the the number of miles  that he or she can drive on a full tank. Use ask a user function to set the value of the miles variable.
  • a third variable called MPG.   This one will store the result of some math and will hold the car’s miles-per-gallon (MPG). Calculate the MPG with the following formulampg (2)
  • The world should have a person and a car. In the initial setup the car should approach the camera and the car should drive into view and stop in front of the camera
  • At the end , your character should say the value of the   mpg , as shown below.

How to use “what as a string”

what as string 2


  • Assignment 1 ) Due 11/19 : Tutorial 4-2 Gum Drop Fish Assignment will be graded (2 points) from packet #13 will be graded  . Download the GumdropBigFish world 
  • gum drop alice
  • Packets 13-15




Quarter 1

11/5 or 11/6 End of the Quarter “test”

  • Review sheet with answers posted in Dropbox.
  • converting other bases to decimals (unit 1)
  • methods vs functions
    • definitions
    • meaning of ‘return a value’
    • screenshots from Alice with connection to these definitions
  • variables
    • definition
    • types of variables
    • use of stirngs in addition
  • identify where the ‘local variable’ button is in Alice

Alice Unit 2

  • End of Unit Open assignment Due Wed 11/12 or thurs 11/13
    • Tell a short story that
    • has at least 3 objects
    • involves 2 local  variables
    • sets the value of a variable to a returned value of a function
    • uses that variable to move one of the objects
  • Due Monday 11/3 Required: Do 2 of the 3 assignments below. To get an “A” you must do all 3,
    • Apollo 15 :
    • screenshot.235During 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”)
      1. 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.
      2. Create a variable called  dropDistance
      3. set the value of this variable to the returned value of a distance function to make the objects fall the distance to the ground.
      4. Make the two objects fall down the value of the distance
    • Steps 2-4 are similar to what is happening in the following picture :
    • screenshot.7
    • 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.
      • create a variable called walkingDistance (determine how far the astronaut must walk)
      • set the value of walkingDistance  to the returned value of a a function  .
      • 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.
  • 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
  • Drag Racing: Due Monday 10/27 
    • Use at least 1 set of comments
    • 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.
  • Complete packets #9-12

Alice Unit 1

  • Quiz Monday/Tuesday on
    • binary number systems (see dropbox notes for review)
    • converting from various bases to base 10(see dropbox notes for review)
    • comment vs instruction in alice
  • Assignment #1, Due Friday October 3rd
    • 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
  • Complete packets #3- 8  by Wednesday the 24th


Week 1

  • Join Dropbox ( so that I can share all class notes with you.
  • Purchase a notebook. Does not matter what type, just a place to put class notes.
  • Practice binary Numbers with this game.

Last Year’s class page (2013-14)






    • 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