Python (Spring 2026) Module 1-6: Completing A1 Hello World
Overview
Bill Moseley demonstrates how to complete and submit the first Python assignment: create a1.py in PyCharm, write a one-line print("hello world") program, run it, and upload the file through Canvas. He explains Python file naming, strings and function arguments, how to recognize errors using PyCharm and exit codes, and why a Python file opened outside PyCharm may show a window only briefly.
Key takeaways
- Use the course naming convention consistently: assignment one must be saved as a1.py, while sandbox one is s1.py.
- The first assignment requires one line of Python: print("hello world"). The quoted text is a string argument passed to the built-in print function.
- PyCharm's run output distinguishes successful execution from errors: exit code zero means success, while exit code one indicates the program quit with an error.
- A red underline in PyCharm can help locate a coding error, and the accompanying error message identifies the relevant line.
- To submit the assignment, upload the actual a1.py file through the Canvas assignment interface and click Submit.
- A Python program launched outside PyCharm may close its window immediately after completing, so use PyCharm to inspect and run beginner assignments.
Chapters
- Create a Python file in the project's main folder, using the assignment naming convention: a1.py for assignment one and s1.py for sandbox one.
- Write a single line, print("hello world"), using the lowercase built-in print function and a quoted string argument.
- Python treats the string literal as characters to display, while the parentheses contain the information passed to the print function.
- Run the current file with PyCharm's play button or the code window's Run a1 option.
- The run output includes the script's file path, the printed text, and an exit code: zero indicates success and one indicates an error.
- A missing quotation mark produces an error message identifying the line, and PyCharm marks the problem with a red underline.
- Open Module 1 in Canvas to find course dates, the textbook link, module videos, and the assignment activity.
- Start the assignment, drag a1.py onto the upload area marked with a rocket, then select Submit and confirm the file appears in the submission.
- Opening a downloaded Python file outside PyCharm may launch a window that closes as soon as the program finishes; inspect and run the file in PyCharm instead.
Transcript excerpt
0:01 Because I want to show you how to complete the first assignment in this class. And it looks like we may even have enough time for you to do it, but this is really quick and easy. And it starts out by opening PyCharm. Okay, so this is what PyCharm looks like when you open a new project. And over here we have all of my files. These folders and files, don't mess with them and don't worry about what they do. That's all I'm going to say. They're just, don't worry about it right now. Not part of this class. But this main folder, where your project folder is, is where you're going to create all of your files. And so I'm going to do assignment one for this
0:56 class right in front of your very eyes. Don't blink or you'll miss it, because it's literally that easy. So Python (or PyCharm, rather) is the place where I create and edit Python files. Python files end in .py, and your computer will run those using the Python virtual machine, which is a program that gets installed on your computer that runs those files. I'll go into more detail on that in the next lecture. But for now, what I want you to know is how to do this. So I'm going to right-click or double-click (nope, two-finger click) on my main folder, and I'm going to choose New from the top of that menu, and I'm going to choose Python file from that. And that's going to open up this little box here with choices that say Python file,
1:53 Python unit test, Python stub. I want a Python file. And I'm going to type the name. Very, very important. Pay attention to this or you will have trouble later. Your files for this class should
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Bill Moseley, Ph.D. - Computer Science Educator.