Skip to Content
Lab 1

Introduction to Python and Computer Programming

Overview and Objectives

In this lab, you will explore the basics of programming and Python. The activities include written exercises and simple coding tasks to ensure you understand what programming is, how Python fits into programming, and how to set up Python on your computer. By the end of this lab, you will be able to:

  • Define computer programming and describe Python’s role in it.
  • Explain how to download and install Python.
  • Write and run a simple Python program (e.g., printing “Hello, World!”).

Instructions and Tasks

Part 1: Written Exercise - Understanding Programming

In your own words, answer the following questions:

  1. What is computer programming, and why is it important in today’s technology-driven world?
  2. Briefly describe what Python is and one reason it is a popular programming language for beginners.
  3. What do you need (software/tools) to start writing and running Python programs on your own computer?

Write 2-3 sentences for each answer. Be clear and concise, and ensure you explain the concepts as if to someone new to programming.

Part 2: Coding Exercise - Your First Python Program

Write a simple Python script that prints the following output exactly:

Hello, World! Welcome to Python programming.

This script should demonstrate that you have Python installed and can run a basic program. You can use an integrated development environment (IDE) or a simple text editor to create the script (for example, hello.py). Run the script to ensure it works, and note any challenges you encountered and how you resolved them.

Part 3: Research Exercise - Interactive Greeting Script

This section will have you attempt to create a simple interactive greeting script, using concepts you have not yet learned. As a programmer, you will be faced with uncertain challenges regularly. Your ability to research and find solutions to these challenges is a key skill in programming.

Modify your script to also prompt the user for their name and then greet them. For example, the program should output:

Hello, World! Welcome to Python programming. What is your name? [User inputs name] Hello, [Name]! Glad to have you learning Python.

Use the input() function to get the user’s name, and string concatenation or formatting to print the greeting. Test your program with a few different names to ensure it works for all inputs (including handling an empty string or unusual characters).

Submission

Your submission should be a single document containing:

  • Your written answers to the questions in Part 1.
  • Your code for the coding exercise in Part 2.
  • Your code for the interactive greeting script in Part 3.

You do not need to include the python script files in your submission, simply copy the code into your text document.

Ensure you clearly label each task in your submission.

Grading Rubric

This lab will be graded on a complete/incomplete basis, and will be scored out of 20 points.

CriteriaCompleteIncompletePoints
All Required Deliverables Submitted
The learner has provided all files, documentation, or other artifacts specified in the assignment instructions (e.g., source code, README, diagrams).
No key component is missing. The assignment can be reviewed and run/tested (if applicable) with the provided materials.Missing key files or deliverables (cannot compile/run, cannot review the work).10
Essential Requirements Fulfilled
The core functionality or goals of the assignment are clearly and sufficiently addressed.
All main tasks or features explicitly stated in the prompt are at least partially implemented. The solution is runnable or reviewable without major, blocking errors. Any primary outputs match what is expected or are reasonably close to the stated requirements.Main functionalities not attempted or severely broken.10
Total30