Home CPSC 110

Lab 1: Hello World

 

Objective

To get Python installed and configured on your computer, and gain experience writing, executing and turning in Python code.


 

Getting Set Up

For the first part of this lab, you should go through the instructions in Chapter 2 to get Python installed on your computer.

You should also read through to understand how the shell window and file window work.


 

Task

Once you have Python and Thonny installed, you should work on the "Hello World" program from the reading. Start by copying the program into the file window:


# this is our first program
print("Hello World!")

Run the program and make sure it prints the message for you. Then you should change the program so that it prints out your name instead.

Then add another line that prints out any message of your choice.

Run the program again and make sure that your message appears.

Be sure to write your program into a file and not the shell! You should save the file as something ending in .py, and be sure to save it some place you can find it again.


 

Submitting

When your program prints your name, email the .py file to ifinlay@umw.edu. Please attach it as a file instead of copying it into the body of the message!

Copyright © 2019 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.