Python code for intro class