Lecture Notes on 10 Sep 2014 Learning objectives for the month of September 2014 * How to create variables * Operators - Arithmetic: + - * / // % ** - Comparison: < <= > >= == != - Boolean: not, and , or - Bitwise: ~ & | ^ - Shift: << >> * Conditionals: if-elif-else * Loops: while, for * Simple Input / Output # Write a program that uses random numbers to quiz a user import random def main(): # generate two random numbers a = random.randint (1, 100) b = random.randint (1, 100) sum = a + b # prompt the user to add those numbers response = eval (input (str(a) + ' + ' + str(b) + ' = ' )) # check if he is correct if (sum == response): print ('correct') else: print ('wrong') main()