0% found this document useful (0 votes)
69 views3 pages

Problem Set #0: Collaboration

This problem set introduces students to Python programming using IDLE. It asks students to install Python and IDLE, complete simple exercises to get familiar with the environment, and write a short program that prompts the user to enter their name and date of birth and prints it out. The instructions provide hints on using print statements and input functions and emphasize collaborating within policy guidelines and including documentation of help received and time spent in submissions.

Uploaded by

Juan Dominguez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views3 pages

Problem Set #0: Collaboration

This problem set introduces students to Python programming using IDLE. It asks students to install Python and IDLE, complete simple exercises to get familiar with the environment, and write a short program that prompts the user to enter their name and date of birth and prints it out. The instructions provide hints on using print statements and input functions and emphasize collaborating within policy guidelines and including documentation of help received and time spent in submissions.

Uploaded by

Juan Dominguez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Problem Set #0

Handed out: Lecture 1.


Due: 11:59pm, Lecture 2 (two days to complete).

Introduction
This problem set will introduce you to the programming environment IDLE and to programming in
Python, as well as to our general problem set structure. In this problem set, you will install IDLE, write a
simple Python program, and hand it in. Be sure to read this problem set thoroughly, especially the
sections of Collaboration and the Hand-in Procedure.

Collaboration
You may work with other students. However, each student should write up and hand in his or her
assignment separately. Be sure to indicate with whom you have worked. For further detail, please review
the collaboration policy as stated in the course information handout.

Installing Python and IDLE


Follow the steps in Getting Python for installing Python and IDLE onto the machine you plan to be
using this term.
Familiarize yourself with Python and IDLE using the exercises given in the handout. Once you are
ready, proceed to the programming part of this assignment.
Note, when you first start using your system, make sure that the version number displayed is not 3.0 or
higher. That version of Python is not backwards compatible with 2.5.4, which is the official Python
version used in this course.

A Very Simple Program: Entering and Printing Your Name


The goal of this programming exercise is simply to get you more comfortable with using IDLE, and to
begin using simple elements of Python. Standard elements of a program include the ability to print out
results (using the print operation), the ability to read input from a user at the console (for example using
the raw_input or input function), and the ability to store values in a variable, so that the program can
access that value as needed.

Problem 1
Write a program that does the following in order:
Asks the user to enter his/her date of birth.
Asks the user to enter his/her last name.
Prints out the users last name and date of birth, in that order.

An example of an interaction with your program is shown below (the words printed in blue are from the
computer, based on your commands, the words in black are a users input the colors are simply here to
help you distinguish the two components):
Enter your date of birth:
**01/26/32
Enter your last name:
**Grimson
Grimson 01/26/32

Hints:
To see how to use the print command, you may find it convenient to look at the input and output section
of the Python Wikibook. This will show you how to use print statements to print out values of strings.
To see how to read input from a users console into the Python environment, you may find it convenient
to look at the same section (see for example the raw_input or input function).
Remember that if you want to hold onto a value, you need to store it in a variable (i.e., give it a name to
which you can refer when you want that value). You may find it convenient to look at the variables and
strings section of the Python Wikibook.

Hand-In Procedure
1. Save
Save your code in ps0.py. Do not ignore this step or save your file(s) with different names.

2. Time and Collaboration Info


At the start of each file, in a comment, write down the number of hours (roughly) you spent on the
problems in that part, and the names of the people you collaborated with.
For example:
# Problem Set 0
# Name: Jane Lee
# Collaborators: John Doe
# Time Spent: 3:30
your code goes here

3. Submit

MIT OpenCourseWare
http://ocw.mit.edu

6.00SC Introduction to Computer Science and Programming


Spring 2011

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

You might also like