CMSC 201

Lab 2: A Simple Program

Debugging

Debugging is the process of eliminating errors from your code. We're going to practice now, so you can get some idea what errors in python look like.

The computer will automatically reject python programs that have mistakes in their syntax. See if you can fix the following program. Remember, if you get stuck, running the program will tell you where the errors are.

# File:        errors.py
# Written by:  Sue Evans
# Date:        2/10/11
# Section:     All
# Email:       bogar@cs.umbc.edu
# Description: This program contains some buggy code for you to correct.

    
print(This program finds the average of two integers.)

num1 = input("Input number one ")
num2 = input("Input number two ")
average = (num1 + Num2) / 2

print("The average of the two numbers is " +  average)