U-Code: Hello World and a few other output programs

This activity will let you practice writing programs that display information.

Turn In: At least three of the following files

Create the filename listed below and complete the task(s) that is indicated. Be sure to run your program and make sure that it runs with no errors and produces the correct results. Submit the completed files to your instructor.

The top of each file should have a comment section that includes the name of the file, your name, the date your program was completed, and a brief description of what it does.

1. HelloWorld.py -- this program will display the message ... Hello World! Enjoy one of my first Python programs.

2. BlockLetters.py -- this program will display your first name, initials (3 or more letters), or last name (choose one of those that is short) in block letters. The letters need to be at least 7 characters high and 7 characters wide. If you are not sure what block lettering looks like, a two letter sample that is 5 characters by 5 characters is provided below. The first letter uses the letter that it is making while the second uses a slash mark. You may do your lettering using either of those or a combination.

     EEEEE  /////
     EE     //
     EEE      ///
     EE        //
     EEEEE  /////

3. TextPicture.py -- this program will display a text picture that you create. The picture should be at least 35 characters wide and 20 characters high. It should incorporate at least 10 different characters/symbols to form a picture. Below is a smaller sample with fewer than 10 characters of what a text picture might look like.

======== // \\ | @ - | | / | | ___ | | | \ / \----/

4. SillySaying.py -- this program is going to display a message about a vehicle. Start your program with the following statement (which assigns the string car to the variable vehicle) ...

     vehicle = 'car'

Then display the message shown below using the variable vehicle where you see the word car.

     I like cars.  I take my car to the grocery store.

Traveling by car is an adventure.

When my car stops working, I am going to get a new car just like it.

I like my car.

Then change the vehicle variable from car to hoverboard and run the program again. Every place you see car should be replaced with hoverboard just by changing the value of the vehicle variable. Be sure that hoverboard is inside the quotes.

Copyright © 2022 Eric Schumm. Permission granted to freely use this in your classroom.