CS 30 Exam 1 Topics ------------------- arithmetic operations + - * / % int, float storing values in variables x = 3 x, y = 1, 2 getting input from the user input vs. raw_input printing output on the screen print string formatting with %f, %d, %s for loops using range for x in sequence: for i in range(len(sequence)): understand the difference between looping through a sequence of values directly vs. using an index number while loops simple decisions using if-else function definitions def name(param1, param2, param3): return value retrieving and storing values in lists values[i] values[-i] values[m:n] values[i] = newval using random numbers random.uniform random.randrange random.choice manipulating strings s[i] string.split string.join s1 + s2 other string library functions (see the table on page 96) reading lines from a file f = open(filename) lines = f.readlines() f.close() manipulating graphics objects