Problem Set 0: Introduction & Installation
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
1) Background Survey
Freshman Sophomore Junior Senior Graduate Student (Non MBA) MBA Student
None HTML AP Computer Science Online coding course (code academy, etc.) Programming Experience in language other than Python Programming Experience in Python Took 6.0001/6.100A/6.100L before Took a Python course at MIT during IAP before (e.g. 6.145) Watched or Participated in Programming course in OCW or edX College course using programming language other than Python College course using Python
To Learn how to Program To Fulfill a Course Requirement To Get a Good Grade other
Google Online coding courses Stack Overflow Friends that know how to program
2) Class Info Assessment
(did you read the course info page?)
problem sets mandatory exercises optional exercises on MITx exams participation
every Monday every Wednesday depends on the pset, check the calendar
generally available with the pset, and due with the pset generally available with a lecture, and due by the beginning of next lecture no deadline per exercise, but must do them all by the end of the course
Email S^3 and post to the forum to schedule a conflict microquiz Conflict microquizzes are not given but the lowest quiz grade is dropped
Yes for you and the friend Yes only for the friend Yes only for you no
Yes for you and the friend Yes only for the friend Yes only for you no
3) Getting started with Python and download the setup files
The rest of this problem set is about setting up your Python environment, writing a simple Python program, and submitting it on our website. Your submission will not be graded, but subsequent problem sets will rely on this procedure.
3.1) Installing Python
Follow the Installing Python instructions under the About tab in the top menu: These will guide you through installing Python, the VS Code editor, and some Python packages we'll need in the course. If you choose not to use the VS Code setup outlined in those instructions, then you are responsible for providing your own Python environment. We use Python 3.11+ in this class, and require the following Python packages:
- numpy
- matplotlib
- seaborn
- scikit-learn
3.2) Making a simple program
The goal is to exercise using some simple elements of Python, including:
- the ability to read input from a user at the console (using the
input
function), - the ability to store values in variables, so that the program can access those values as needed,
- and the ability to print out results (using the
print
function).
In the unzipped ps0 folder from the Installing Python instructions, open the file named ps0.py, and write a program that does the following in order:
- Ask the user to enter a number
x
. - Ask the user to enter a number
y
. - Print the value of
x
raised to the powery
. - Print
x
immediately followed byy
with no spaces or newlines.
An example run of the program is shown below.
The numbers printed after :
on a line are instances of a user's input.
The rest should be printed by your program.
Enter number x: 78
Enter number y: 9
x to the power of y is 106868920913284608
x smushed with y is 789
4) Submission
At the start of ps0.py in the header comments, fill in your name and the names of your collaborators. Save the file, and upload it via the Select File button below. Then click the Submit button.
Refresh the page, and verify via the Download Most Recent Submission link that the correct file was uploaded. For all psets, always do this step to confirm we received the file you intended.
When you re-upload a file, your previous submission will be overwritten. Pset 0 does not count for a grade. For all other psets, if you upload anything after the due time (see the top of each pset page), it will count as your latest submission, and late days will start applying for the entire pset.