CS101


Lab03_2017.10.10

lab03's materials


Anaconda


THX TA Qingle Huang(ql_huang@zju.edu.cn)

Overview

  • Install On Windows
  • Install On Linux
  • Install On Mac OS

Install On Windows

  1. Download Anaconda installer From
    https://pan.baidu.com/s/1kVaINcF

  2. Install using the downloaded installer
    Just follow the instructions the installer given. When you see the following interface, check both boxes. Then, click “Install”.
    2017-09-28_164916

  3. Open jupyter notebook
    Please see the powerpoint I have already given to you. There are many other ways, search on the Internet.

  4. Open python interpreter
    Press “Win” key + “R” key, when you see the following interface, type “python” and click “OK”
    2017-09-28_164916-1

  5. Open python interpreter
    When you see the following interface, you have already opened the interpreter. Type “print(‘hello world’)” to test.
    2017-09-28_164916-2
    2017-09-28_164916-3

Install On Linux

If you use Linux OS, I think you can install python and jupyter notebook by yourself. Good Luck!

A suggestion: On Linux, I think “pip” is a better choice than Anaconda to manage python packages. So you don’t have to install Anaconda.

Install On Mac OS X

Since I don’t have a Max OS X computers, I can’t write a tutorial and assure it will work on Max OS X.

So if you use Max OS X, you have to search the Internet for help. Good luck!

P.S.: If you really need help, you can still contact me.

Change to python3

If you have installed python2 in your computer, you can execute these lines to activate python3:

conda create --name python3 python=3
activate python3 # in windows
# source activate python3 # in others
conda install nb_conda

Then you can choose the kernel(python3) in your jupyter notebook.


Lab02_2017.9.27

Starter

Today we have two tasks. One in our paper(the second page's exercise), the other in our course website. Now following these tips to help you complete today tasks.

  • login in computer. username is your INTL email, password is your email's password.
  • maybe you need install Chorme browser in this step, access our course website, or download two files directly(right click, select save target/link as...), lab02.ipynb,rocket.py
  • click search the web and Windows, input jupyter notebook, then it will open browser. OR, press Win+R inputcmd, then input jupyter notebook.
  • find the files you download, open it, you can start your task now.

Tips about lab02.ipynb

this file has some teaching details, it will teach you how to use jupyter and how to code. surely it has some exercises, you should complete them. For example,

# write your series of +=, -= statements here
# write a formula for T here, using pi (and not an approximation)
# modify this code
# and so on, you should find what you need to complete.
  • we should note that 3/5=0 in python2. if we want to make it to 0.6, we should write 3/5.=0.6

Submission

  1. File name: save and rename lab01.ipynb as lab02_[your_student_ID].ipynb after you're done and send it to cs101homework@intl.zju.edu.cn, Must send files by your INTL email.
  2. Email title: Please use the following format: CS101-Lab02-Group[A1]-[your_student_ID]. Unclear email titles may result in a credit penalty.
  3. Hand in the handout to the instructor at the end of this lab session. Remember to write down your name, your student ID, and the lab section (lab#02) on the second page.

Attendance and grading policy

The labs collectively constitute 25% of your grade in CS 101. Although they will gradually increase in difficulty, you should be able to complete the lab exercises in the 1h50min period allotted to you. You have 1 hour and 50 minutes to complete the lab and late submissions will not be tolerated, since the labs are running at the capacity of the room.

A corollary policy is that you should always attend your assigned lab section. Attendance and submission of your work will be graded on that basis, and failure to attend the proper section in which you are enrolled may lead to a grade of zero on that lab. Any exceptions must go through the Instructor for permission.

When a student has a permitted absence for lab, make-up labs will be arranged. Make-up labs can come in the form of:

  1. students attending alternative lab sessions during the same week (the attendance grade will still be recorded); or
  2. alternative one-on-one time to finish the lab material.