Computer Programming
Computer Programming
Programming
Summer 2011
Marek Janicki
Administration
June 2 2011
Assignment 1
● Find_factor()
● Between 0 and 100 is exclusive, means 1<=x<=99
● We are counting non-prime factors, so 4 is an
acceptable answer.
● 1 is not considered a factor, unless the input is 1.
● Find intercept()
● Don't need to worry about lines that don't have
intercepts.
● In general, don't need to worry about inputs for
which there is no answer.
June 2 2011
What if we don't want numbers?
June 2 2011
Strings
● Sequences of characters.
● Two types str and unicode.
●We'll use str in this course.
● It contains the roman alphabet, numbers a few
symbols.
● Unicode is larger, contains more accented letters,
Chinese characters, and more.
● Strings are denoted by single or double quotes.
● Quote type must match!
June 2 2011
String operations.
June 2 2011
User input.
June 2 2011
Modules.
June 2 2011
Using modules.
June 2 2011
Remember!
June 2 2011
Break, the second.
June 2 2011
Repetition
June 2 2011
Why loops?
June 2 2011
Assignment Questions
June 2 2011