0% found this document useful (0 votes)
58 views7 pages

Problem Set 0

Uploaded by

yahya
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)
58 views7 pages

Problem Set 0

Uploaded by

yahya
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/ 7

Problem Set 0: Introduction & Installation

The questions below are due on Friday September 09, 2022; 09 00 00 PM.

1) Background Survey
What is your Grade Level?
Freshman
Sophomore
Junior
Senior
Graduate Student (Non MBA)
MBA Student
Submit

You have infinitely many submissions remaining.

What is your (first) major? If freshman, choose "Freshman".


--

Submit

You have infinitely many submissions remaining.

What is your second major? If not double majoring or undecided, do not answer this question.
--

Submit

You have infinitely many submissions remaining.

Approximate Lines of Code written before enrolling in 6.100L --


Submit

You have infinitely many submissions remaining.

1
Prior Programming Experience?
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
Submit

You have infinitely many submissions remaining.

Why did you enroll in 6.100A?


To Learn how to Program
To Fulfill a Course Requirement
To Get a Good Grade
other
Submit

You have infinitely many submissions remaining.

Select all of the resources that you are aware of or have used to help learn how to program.
Google
Online coding courses
Stack Overflow
Friends that know how to program
Submit

You have infinitely many submissions remaining.

2) Pset Buddy
Do you want to sign up for Pset buddies? Each week you will get assigned a new person to collaborate with on the pset. You
and your buddy will be matched based on timezone/experience/class year, and may collaborate on the pset as much as you
2
wish, without penalty for similar code. You can change your options for each pset, up until 9pm the night before the pset is
released.

3) Class Info Assessment


Which of the following count towards your grade?
problem sets
mandatory exercises
optional exercises on MITx
exams
lecture attendance and participation
recitation attendance and participation
Submit

You have infinitely many submissions remaining.

When are problem sets due?


every Monday
every Wednesday
depends on the pset, check the calendar
Submit

You have infinitely many submissions remaining.

When are mandatory finger exercises due?


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
Submit

You have infinitely many submissions remaining.

Microquizzes are in the last 20-45 minutes of specific lectures outlined in the calendar. What happens if you
cannot make it to a microquiz?
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
Submit

You have infinitely many submissions remaining.


3
You are working with a friend (not your assigned pset buddy) on the problem set. Your friend tells you to use a
specific kind of loop to solve a part. Is this a collaboration violation?
Yes for you and the friend
Yes only for the friend
Yes only for you
no
Submit

You have infinitely many submissions remaining.

You are stuck debugging the problem set. Your friend (not your assigned pset buddy) already finished but they
can't stay to help you anymore, so they email you the code. You look over the part you are stuck but write up
your own code. Is this a collaboration violation?
Yes for you and the friend
Yes only for the friend
Yes only for you
no
Submit

You have infinitely many submissions remaining.

4) Introduction to Python & Spyder


This problem set will introduce you to the programming environment Spyder from the Anaconda Distribution of Python, and
to programming in Python, as well as to our general problem set structure. In this problem set, you will confirm your
installation of Python, write a simple Python program, and hand it in. Be sure to read this problem set thoroughly,
especially the Collaboration and Hand-in Procedure sections.
4.1) 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 in the comments of your submission.
4.2) Installing Python & Spyder
Follow the steps in the Getting Started handout for installing the Anaconda distribution of Python and Spyder onto the
machine you plan to be using this term. The numpy and matplotlib packages, which will be used primarily in 6.0002, should
come with the installation. Familiarize yourself with Python and Spyder using the exercises given in the handout. Once you
are ready, proceed to the programming part of this assignment.
This class uses Python version 3.0 or higher.
4
When you first start using your system, make sure that the version number displayed is 3.0 or higher. Python 3 is not
backwards compatible with versions starting with 2.x.
4.3) Your First Program: Raising a number to a power and taking a logarithm
The goal of this programming exercise is to make sure your python and numpy installations are correct, to get you more
comfortable with using Spyder, 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 input function), and the ability to store values in a variable, so that the program can access that value as needed.
4.3.1) Assignment
Write a program that does the following in order:
1. At the top of your file and type: import numpy
2. Now write a line that sets a variable named x to 5.
3. Now write a line that sets a variable named y to 8.
4. Add variables x and y, and save the result to a variable named z .
5. Now save the result of this command: numpy.log2(z) to a variable named a .
Use Spyder to create your program, and save your code in a file named 'ps0.py'.
Hints:
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.

5) Hand-in Procedure
5.1) Save
Save your code in `ps0.py`. *Do not ignore this step or save your file(s) with different names.*
5.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 your collaborators. For example:
# Problem Set 0
# Name: Jane Lee
# Collaborators: John Doe
# Time Spent: 3:30

… your code goes here …

5.3) Submit
5
After you completed the steps in the file "Getting Started" from the downloaded files and Problem 3 above, upload your file
here. You may upload new versions of each file until the 9PM deadline, but anything uploaded after that time will be counted
towards your late days, if you have any remaining. If you have no remaining late days, you will receive no credit for a late
submission.
When you upload a new file, your old one will be overwritten.
Select File No file selected

Submit

You have infinitely many submissions remaining.

6
MIT OpenCourseWare
https://ocw.mit.edu

6.100L Introduction to CS and Programming Using Python


Fall 2022

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

You might also like