CSE 110 | Programming Building Blocks

01 Prepare: Preparation Material

Overview

Welcome to CSE 110!

This week you will set up your computer with the applications you will use this semester. You will need the following:

Once you have those in place, you will begin writing your very first programs.

Preparation Material

One of the great things about programming in this day and age is that there is a wealth of information available on the internet. In fact, professional programmers spend a good part of their days looking for answers on the internet and then piecing them together and modifying them to fit the specific problem at hand.

This means that to be a successful programmer you need the following:

  1. A strong understanding of the fundamentals of programming (what you'll study in this and subsequent courses).

  2. The ability to learn and apply new things.

  3. The ability to use information from various online sources.

This course and subsequent courses are designed to help you grow in all three of these areas.

In this course, you will be provided the information you will need to be successful, whereas in future courses you will develop your ability to find more and more of the information for yourself. But even in this course, you will start to learn to use material from many different sources on the internet. Some will be written by BYU-Idaho, but much of it will be curated for you from various resources available on the internet.

Install Python and Visual Studio Code

One of the resources we will use throughout the semester is a series of videos created by Microsoft to help new programmers learn to write Python programs. To begin this lesson, please watch the videos below.

As shown in these videos, you will need to download and install both Python and Visual Studio Code on your computer. Please note in the video where they walk through installing Visual Studio Code, they mention it is a good idea to also get the Python extension for Visual Studio Code, but don't really walk through it. Then, in the next video, they show how to install the extension in more detail.

Also, please note that your Visual Studio Code preferences may be set up slightly differently than those in the video, so don't be alarmed if your extensions bar is on the left side and theirs is on the right.

As you follow the videos above, you'll be downloading programs and an extension from:

The Basics of Writing a Program

We all interact with many kinds of devices, websites, and apps that are made from "programs." As you might imagine, apps like Instagram or Google Maps are pretty complex and have taken teams of professional programmers many months or years to create. You are starting on the journey that can lead to creating programs that are just polished and interactive, but we will begin with much simpler programs.

The essence of all programs, no matter how complex or simple, is that they provide a step-by-step list of instructions that the computer will follow. The computer, while powerful, is also very simplistic—it only does what you tell it. In addition, it does exactly what you tell it to do, nothing more and nothing less, and if you leave out a very small thing, or make even a tiny mistake, the computer is very unforgiving.

Starting with this lesson, we are going to practice writing programs—the step-by-step instructions for the computer—and we are going to start with simple ones. We will start by displaying words on the screen and have the user type responses in a text window. While not nearly as glamorous as the professional apps you see around you, the fundamentals are the same. These simple programs will help you develop skills you need to create more powerful and more exciting applications as you continue to learn.

Please watch the following videos that introduce the idea of writing programs. While you are watching, you might want to pause the videos and follow along by typing the same code on your computer. The demos they walk through will be very similar to the assignments you have this week.

Typing python and the name of your program to run it (like they did in the video) only works if your computer is set up to find Python automatically. If it works for you, feel free to use that approach, but otherwise, it's not a problem.

If typing python doesn't work for you, the simplest way to run your program, and the one that works the most reliably regardless of your computer's configuration, is to make sure your program is saved with .py at the end of the filename, and then click the green play button in the upper right hand corner to run the program. Other students have also found that typing python3 or py instead of python has worked for their configuration.

Next Steps

Once you have finished with watching these videos and installing the applications mentioned above, you are prepared to complete the assignments of this course.