Georgia State University
Department of Computer Science
CSc 2010
Spring, 2010
Programming
Assignment 1
Due: January 28, 2010
Purposes of
Assignment
1. Become familiar with Python.
2. Become familiar with Scribbler movement commands.
3. Learn how to write simple programs.
Description of
Program
You are to write a program named drawStaircase that moves the robot in staircase
pattern. In the beginning, the program will prompt the user for the number of
steps (nSteps > 0) in the staircase. Starting from
an initial position (assuming that the robot is facing north), the program will
make the robot move north by 1 foot and then east by 1 foot for each staircase
step. After it has completed the last step, it must move southwards all the way
down to the position that is in line with the starting position and then move
westwards to finally end up at the starting position. Here is an ideal
staircase movement for nSteps=3:
Note that there is no command to turn the robot a
specified number of degrees, so you need to experiment to figure out the speed
of movement. Similarly, there is no command to move a specified distance, so
this will also require experimentation.
Your program should have the overall appearance shown on
page 45 of Kumar's book. You must put comments at the beginning of the program
giving the program name, the names of the team members, the course number (CSc
2010), and the date.
Program Submission
Email your drawStaircase.py file to smarkham@gsu.edu
by 11:59 p.m. on the assigned date. The assignment is worth 20 points. The
penalty for late assignments is 4 points per calendar day.