bembry.org
Home / Technology / Python / Exercises

Python Lesson 2 Exercises: Beyond "Hello World"

Write each script described below. Save each script in your folder as "pa2-1", "pa2-2", and so forth. Run the script to make sure it works. Print out your code for exercise 4 and turn it in.

Exercise 1
Write a script that will print your name, grade in school, and class period.

Exercise 2
Write a script that will print out your initials in big block letters, like follows:

  BBBBBB    EEEEEEEE
  BB    B   EE
  BB    B   EE
  BBBBBB    EEEEE
  BB    B   EE
  BB    B   EE	
  BBBBBB    EEEEEEEE

Exercise 3
Write a script to print out the 5 times table, starting with 5 x 0 and going to 5 x 12.

Exercise 4
Write a script that will print out the following information, including the answer for each question. (NOTE: * = Multiply, / = Divide, ** = Exponential power)

Name: (Your Name)
Class: Magic Number 144
Teacher: Mr. Euclid

1. 144 + 144
2. 144 - 19
3. 144 x 9
4. 144 ÷ 12
5. 1442
6. 144 + 24
7. 144 - 45
8. 144 x 11
9. 144 ÷ 70
10. 1440.5

Lesson Exercises Python Lessons Homepage

Restricted access