CSCI 150 Tips and Handouts
I will post general tips and handouts on this page. Please check often to make sure you do not miss any important information.
General Tips
- If you aren't sure whether you should start with CSCI 140, CSCI 150, or CSCI 151, please check out this guide!
- The Computer Science Department provides a page on General Problem Solving Tips
- For instructions on how to install Python and Komodo Edit on a Mac, as well as how to remote connect to the OCCS server to work on and handin your labs, click here!
Slides from Class
The course slides are posted on Blackboard under "Course Content" -> "Slides".
Code from Class
Jan 30: Feb 1: Feb 3:- sum.py (for loops with start/end)
- celebrate.py (for loop with only end specified)
- countdown.py (for loop with start/end/step specified)
- dataTypes.py (integers, floats, strings, and Booleans)
- skips.py (demonstrates how the skip parameter in range affects for loops)
- printingFor.py (body of a for loop vs. code after a for loop)
- concatenation.py (demonstrates String concatenation)
- calcE.py (uses nested for loops to estimate Euler's constant e)
- distances.py (shows how we can find the square and square root of numbers)
- picture.py
- house.py (draws a picture of a house)
- badFactorial.py (runs factorial with a negative input)
- factorial2.py (only runs factorial on positive inputs)
- factorial3.py (gives an error message on non-positive inputs)
- leapYears.py (determines whether a year is a leap year using nested if-else statements
- leapYears2.py (uses a single level of elif statements)
- choose.py (calculates n choose k [from Lab 1])
- chooseFunctions.py (calculates n choose k using the factorial function from the math module [from Lab 1])
- patternNFunctions.py (uses functions to create Pattern N [from Lab 2])
- houseFunctions.py (splits the house.py program into different functions)
- inputProgram.py (keeps asking user for inputs with a while loop as part of an ASCII art show)
- exceptions.py (demonstrates try-except block)
- palendromes.py (testing whether strings are palendromes)
- clickers.py (demonstrates reading data from file and splitting strings between commas)
- responses.txt (the comma-separated data for clickers.py)
-
stringCounting.py (Iterative solutions for counting the length of a string)
- factorialRec.py (Recursive solution for factorial)
- contains.py (Recursive solution for List contains)
- reverse.py (Recursively solution for reversing a list)
- testingFib.py (compares iterative and recursive solutions to generating the Fibonacci sequence)
- hanoi.py (Towers of Hanoi problem)
- sorting.py (comparison of Selection, Insertion, Bubble, and Merge Sort)
- binarySearch.py (comparison of Binary Search and Linear Search)
- student.py (Class definition for Student)
- demoStudents.py (Program demoing the use of Student class)
- song.py
- album.py
- playlist.py
- demoMusic.py (Program demoing the use of the Song and Playlist classes)
- person.py (a general Person class)
- student2.py (a second Student class that inherits from Person