CS 111 - Spring 2018

Sample Code

Note that this wiki attaches the Python programs as text files. You will need to change the filenames after downloaded to remove the .txt extension, or just cut and paste from the web page.

Sound Manipulation Code:

Picture Manipulation Code: Turtle Drawing Code
  • lect02013d.py.txt - Function to draw arc where turtle is returned to original starting position before arc is drawn.
  • lect02013c.py.txt - Function to draw star of a given color, where pen color is restored to original pen color. Change to the pen is localized to the function
  • lect02013b.py.txt - Function to draw star of a given color, but pen color extends outside of the function
  • lect02013a.py.txt - Functions to the draw star and draw circle
  • lect0208g.py.txt - Adding more circles to the design from lect0208f.py
  • lect0208f.py.txt - Using the loop Counter variable to change to size of the circles drawn and the color of the circles drawn
  • lect0208e.py.txt - Drawing multiple circles across the world using a loop
  • lect0208d.py.txt - Drawing multiple circles highlighting the difference between the 2 different "reposition Turtle" functions
  • lect0208c.py.txt - Drawing multiple circles showing similarities between the 2 different "reposition turtle" functions
  • lect0208b.py.txt - Moving the code to reposition a turtle into a function, making main() easier to read
  • lect0208a.py.txt - Drawing two circles with the reposition code between the two function calls
  • lect0206d.py.txt - Code drawing multiple Circles and multiple hexagons
  • lect0206c.py.txt - Code to draw multiple "Circles" - each circle is a 30 sided polygon
  • lect0206b.py.txt - Code to draw multiple Octagons using a function
  • lect0206a.py.txt - Code that opens a picture on the computer, draws on it, displays it, then saves the updated picture back on the computer
  • lect0201h.py.txt - Code showing how to draw on a picture rather than a world
  • lect0201f.py.txt - Drawing multiple hexagons of different sizes
  • lect0201e.py.txt - Drawing multiple hexagon spun around from a central point
  • lect0201d.py.txt - Modifying lect0201a.py to call the drawHex function
  • lect0201c.py.txt - Modifying the drawHex function to include a length parameter
  • lect0201b.py.txt - Drawing two hexagons using on "drawHex" functions
  • lect0201a.py.txt - Drawing multiple hexagons with one loop nesting inside another loop
  • lect0130d.py.txt - Drawing two hexagons using loops
  • lect0130c.py.txt - Drawing a blue square without a loop, drawing a red hexagon with a loop
  • lect0130b.py.txt - Drawing a blue square and a red hexagon
  • lect0130a.py.txt - Drawing a blue square and a red triangle
  • lect0125d.py.txt - Drawing 2 squares of different colors
  • lect0125c.py.txt - Showing the difference in syntax between FUNCTIONS and METHODS
  • lect0125b.py.txt - Drawing 2 squares using Turtles
  • lect0125a.py.txt - Draw a square using a Turtle
General Python Code
Topic attachments
I Attachment Action Size Date Who Comment
JPEGjpg batmanGreenScreen.jpg manage 12.1 K 2018-03-22 - 19:42 UnknownUser  
JPEGjpg blue-mark.jpg manage 59.7 K 2018-03-22 - 19:42 UnknownUser  
JPEGjpg jenny-red.jpg manage 94.4 K 2018-03-06 - 17:35 UnknownUser  
Texttxt lect0118a.py.txt manage 0.1 K 2018-02-01 - 21:08 UnknownUser  
Texttxt lect0118b.py.txt manage 0.6 K 2018-01-19 - 02:02 UnknownUser  
Texttxt lect0125a.py.txt manage 0.3 K 2018-01-25 - 18:44 UnknownUser  
Texttxt lect0125b.py.txt manage 0.6 K 2018-01-25 - 18:44 UnknownUser  
Texttxt lect0125c.py.txt manage 0.7 K 2018-01-25 - 18:44 UnknownUser  
Texttxt lect0125d.py.txt manage 0.8 K 2018-01-25 - 18:44 UnknownUser  
Texttxt lect0130a.py.txt manage 0.8 K 2018-01-30 - 18:01 UnknownUser  
Texttxt lect0130b.py.txt manage 1.0 K 2018-01-30 - 18:01 UnknownUser  
Texttxt lect0130c.py.txt manage 0.9 K 2018-01-30 - 18:01 UnknownUser  
Texttxt lect0130d.py.txt manage 1.0 K 2018-01-30 - 18:01 UnknownUser  
Texttxt lect02013a.py.txt manage 2.3 K 2018-02-13 - 19:58 UnknownUser  
Texttxt lect02013b.py.txt manage 2.3 K 2018-02-13 - 19:58 UnknownUser  
Texttxt lect02013c.py.txt manage 2.6 K 2018-02-13 - 19:58 UnknownUser  
Texttxt lect02013d.py.txt manage 3.2 K 2018-02-13 - 19:58 UnknownUser  
Texttxt lect02015a.py.txt manage 0.6 K 2018-02-15 - 17:51 UnknownUser  
Texttxt lect0201a.py.txt manage 0.9 K 2018-02-01 - 21:09 UnknownUser  
Texttxt lect0201b.py.txt manage 0.8 K 2018-02-01 - 21:11 UnknownUser  
Texttxt lect0201c.py.txt manage 0.8 K 2018-02-01 - 21:11 UnknownUser  
Texttxt lect0201d.py.txt manage 0.9 K 2018-02-01 - 21:13 UnknownUser  
Texttxt lect0201e.py.txt manage 0.8 K 2018-02-01 - 21:17 UnknownUser  
Texttxt lect0201f.py.txt manage 0.8 K 2018-02-01 - 21:17 UnknownUser  
Texttxt lect0201h.py.txt manage 0.5 K 2018-02-04 - 23:31 UnknownUser  
Texttxt lect0206a.py.txt manage 0.7 K 2018-02-06 - 17:43 UnknownUser  
Texttxt lect0206b.py.txt manage 1.1 K 2018-02-06 - 17:43 UnknownUser  
Texttxt lect0206c.py.txt manage 1.7 K 2018-02-06 - 17:43 UnknownUser  
Texttxt lect0206d.py.txt manage 1.9 K 2018-02-06 - 17:43 UnknownUser  
Texttxt lect0208a.py.txt manage 1.9 K 2018-02-08 - 17:42 UnknownUser  
Texttxt lect0208b.py.txt manage 2.5 K 2018-02-08 - 17:42 UnknownUser  
Texttxt lect0208c.py.txt manage 3.2 K 2018-02-08 - 17:43 UnknownUser  
Texttxt lect0208d.py.txt manage 3.3 K 2018-02-08 - 17:43 UnknownUser  
Texttxt lect0208e.py.txt manage 2.8 K 2018-02-08 - 17:43 UnknownUser  
Texttxt lect0208f.py.txt manage 2.9 K 2018-02-08 - 17:43 UnknownUser  
Texttxt lect0208g.py.txt manage 2.9 K 2018-02-08 - 17:43 UnknownUser  
Texttxt lect0220a.py.txt manage 0.8 K 2018-02-20 - 18:42 UnknownUser  
Texttxt lect0220b.py.txt manage 0.9 K 2018-02-20 - 18:42 UnknownUser  
Texttxt lect0220c.py.txt manage 0.9 K 2018-02-20 - 18:42 UnknownUser  
Texttxt lect0220d.py.txt manage 1.2 K 2018-02-20 - 18:42 UnknownUser  
Texttxt lect0227a.py.txt manage 1.2 K 2018-03-02 - 15:50 UnknownUser  
Texttxt lect0227b.py.txt manage 1.1 K 2018-03-02 - 15:50 UnknownUser  
Texttxt lect0227c.py.txt manage 1.1 K 2018-03-02 - 15:50 UnknownUser  
Texttxt lect0227d.py.txt manage 1.1 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0227e.py.txt manage 1.2 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0301a.py.txt manage 1.4 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0301b.py.txt manage 1.4 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0301c.py.txt manage 1.8 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0301d.py.txt manage 1.8 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0301e.py.txt manage 1.9 K 2018-03-02 - 15:51 UnknownUser  
Texttxt lect0306a.py.txt manage 1.0 K 2018-03-06 - 17:34 UnknownUser  
Texttxt lect0306b.py.txt manage 1.2 K 2018-03-06 - 17:34 UnknownUser  
Texttxt lect0306c.py.txt manage 1.2 K 2018-03-06 - 17:34 UnknownUser  
Texttxt lect0306d.py.txt manage 1.3 K 2018-03-06 - 17:34 UnknownUser  
Texttxt lect0306e.py.txt manage 1.4 K 2018-03-06 - 17:35 UnknownUser  
Texttxt lect0308a.py.txt manage 0.5 K 2018-03-08 - 18:43 UnknownUser  
Texttxt lect0308b.py.txt manage 1.6 K 2018-03-08 - 18:43 UnknownUser  
Texttxt lect0308c.py.txt manage 1.1 K 2018-03-08 - 18:43 UnknownUser  
Texttxt lect0308d.py.txt manage 1.2 K 2018-03-08 - 18:43 UnknownUser  
Texttxt lect0313a.py.txt manage 1.2 K 2018-03-13 - 16:12 UnknownUser  
Texttxt lect0313b.py.txt manage 1.2 K 2018-03-13 - 16:12 UnknownUser  
Texttxt lect0313c.py.txt manage 1.2 K 2018-03-13 - 16:12 UnknownUser  
Texttxt lect0313d.py.txt manage 1.3 K 2018-03-13 - 16:12 UnknownUser  
Texttxt lect0315a.py.txt manage 1.3 K 2018-03-16 - 17:41 UnknownUser  
Texttxt lect0315b.py.txt manage 1.5 K 2018-03-16 - 17:41 UnknownUser  
Texttxt lect0315c.py.txt manage 1.5 K 2018-03-16 - 17:41 UnknownUser  
Texttxt lect0315d.py.txt manage 1.1 K 2018-03-16 - 17:41 UnknownUser  
Texttxt lect0315e.py.txt manage 1.7 K 2018-03-16 - 17:41 UnknownUser  
Texttxt lect0315f.py.txt manage 1.2 K 2018-03-16 - 17:41 UnknownUser  
Texttxt lect0320a.py.txt manage 1.4 K 2018-03-22 - 19:29 UnknownUser  
Texttxt lect0320b.py.txt manage 0.2 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0320c.py.txt manage 1.4 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0320d.py.txt manage 1.6 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0320e.py.txt manage 2.2 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0322a.py.txt manage 2.2 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0322b.py.txt manage 2.5 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0322c.py.txt manage 2.3 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0322d.py.txt manage 2.3 K 2018-03-22 - 19:28 UnknownUser  
Texttxt lect0322e.py.txt manage 2.4 K 2018-03-22 - 19:27 UnknownUser  
Texttxt lect0322f.py.txt manage 1.4 K 2018-03-22 - 19:27 UnknownUser  
Texttxt lect0322g.py.txt manage 1.7 K 2018-03-22 - 19:27 UnknownUser  
Texttxt lect0322h.py.txt manage 1.3 K 2018-03-22 - 19:27 UnknownUser  
Texttxt lect0403a.py.txt manage 0.2 K 2018-04-05 - 14:36 UnknownUser  
Texttxt lect0403b.py.txt manage 0.7 K 2018-04-05 - 14:36 UnknownUser  
Texttxt lect0412a.py.txt manage 0.6 K 2018-04-12 - 20:37 UnknownUser  
Texttxt lect0412b.py.txt manage 1.0 K 2018-04-12 - 20:37 UnknownUser  
Texttxt lect0412c.py.txt manage 0.9 K 2018-04-12 - 20:37 UnknownUser  
Texttxt lect0417a.py.txt manage 1.1 K 2018-04-17 - 20:27 UnknownUser  
Texttxt lect0417b.py.txt manage 1.0 K 2018-04-17 - 20:27 UnknownUser  
Texttxt lect0417c.py.txt manage 0.9 K 2018-04-17 - 20:27 UnknownUser  
Texttxt lect0419a.py.txt manage 0.9 K 2018-04-19 - 16:03 UnknownUser  
Texttxt lect0419b.py.txt manage 1.1 K 2018-04-19 - 16:03 UnknownUser  
Texttxt lect0419c.py.txt manage 1.4 K 2018-04-19 - 16:03 UnknownUser  
Texttxt lect0419d.py.txt manage 1.8 K 2018-04-19 - 16:03 UnknownUser  
Texttxt lect0424a.py.txt manage 1.1 K 2018-04-24 - 17:27 UnknownUser  
Texttxt lect0424b.py.txt manage 1.4 K 2018-04-24 - 17:27 UnknownUser  
Texttxt lect0424c.py.txt manage 0.7 K 2018-04-24 - 17:27 UnknownUser  
Texttxt lect0424d.py.txt manage 0.9 K 2018-04-24 - 17:27 UnknownUser  
Texttxt lect0426a.py.txt manage 1.2 K 2018-04-26 - 16:52 UnknownUser  
Texttxt lect0426b.py.txt manage 3.4 K 2018-04-26 - 16:52 UnknownUser  
Texttxt lect0501a.py.txt manage 1.2 K 2018-05-03 - 14:14 UnknownUser  
Texttxt lect0501b.py.txt manage 1.9 K 2018-05-03 - 14:14 UnknownUser  
Texttxt quicksort.py.txt manage 2.3 K 2018-05-03 - 14:14 UnknownUser  
Texttxt selectionsort.py.txt manage 6.4 K 2018-05-03 - 14:14 UnknownUser  
Texttxt template.py.txt manage 0.5 K 2018-01-19 - 02:02 UnknownUser  
Topic revision: r25 - 2018-05-03 - 14:15:57 - Main.troy
 
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
WISEST
Helping Women Faculty Advance
Funded by NSF