Intro to
Computer
Science

Spring 2021
course
site
-->

running python : IDLE, jupyter, shell, etc - Mon Feb 22

... start recording

First order of business : questions about anything at all?

Some of you have started submitting work on the course website, which is great. I've been responding with comments. I encourage you to turn in pieces of the assignment throughout the week, and we can discuss back-and-forth on the work page. (But if you need a quicker responsed, use Slack or email.)

practice / discussion on running python in various ways

Here's a program to try :

""" A short python program with a loop. """
def loopy(n):
    """ print numbers 1 to n """
    for i in range(1, n+1):
        print(i)
loopy(10)

discuss computer terminology & concepts

Perhaps put some answers on the wiki page ....

... break ...

breakouts : work in class on unix shell lab in assignment 1

I'll start us going, then let you work in breakout rooms ...

... and then come back together.

Some useful commands :

ls          list directory
pwd         print working directory
cd          change directory
mv          move (i.e. rename) file or directory
rm          remove (i.e. delete) file  (or with -rf , whole folders)
nano        edit a file right in the terminal, i.e. "nano hello.py"      
python      run python interactively, i.e. get ">>>" python prompt

Special folder symbols : . current folder .. parent folder ~ home folder

Other useful stuff : printenv all environment varibles echo $PATH see one environment variable ; PATH is search order for commands alias l="ls -sCF" create a command shortcut nano ~/.profile edit your startup file (shortcuts or PATH changes)

... break ...

Questions about anything?

start chapter 2 material

Next set of notes : writing simple programs

... or on Thursday, depending on time.

https://cs.bennington.college /courses /spring2021 /introcs /notes /1c_shell_etc
last modified Mon February 22 2021 9:59 am