Anatomy of a Computer Program
Reserved Keywords
Identifiers
Variables:
Constants:
Subroutines:
Values
String Values:
Integer Values:
Float/Real Values:
Boolean Values:
defcalculateArea():
PI=3.14
circle=True
ifcircle==True:
#Ask user to enter a radius
radius=int(input("Enter a radius:"))
whileradius<=0 or radius>100:
radius=int(input("Enter a valid radius"))
#Calculate and output the area of the circle
area=PI*radius**2
print("Area:")
print(area)
Computing Operators
Assignment Operators
Arithmetic Operators
Comparison Operators
Boolean Operators
Punctuation
Comments