BYU logo Computer Science

CS 110 Course Vision

Hello! We designed this course as a way for anyone to learn to program.

We believe you can succeed.

It doesn’t matter if you’ve never programmed before or if you think you’re not “good” at this sort of thing. Anyone can learn any skill if they choose to practice it, and that includes programming.

Each of us has a divine potential because each is a child of God. Each is equal in His eyes. (President Nelson, Let God Prevail, October 2020)

divine potential

Keys to success

  1. Ask questions. This is a key part of learning.
  2. Be purposeful in your effort. Put in the practice needed to learn, and discern when you should ask for help.
  3. Make friends and learn with friends. Programming is a team effort. Time spent now to learn what employers call “soft skills” to be a great team player will pay off immensely later.
  4. Attend labs, get help from TAs, the instructor, and the Belonging mentors. You are at a great university with wonderful resources. Use them!
  5. Get sleep. It is normal to go to bed with a problem and wake up with a solution. A rested mind is remarkalbly more efficient than a tired one.
  6. Rely on the atonement of Jesus Christ. Remember that Jesus Christ can help you with anything you are struggling with. That includes learning, especially since learning is a fundamental reason why you are here.

Programming

When you write a program, you are telling the computer what to do. You’re in charge, and the computer just does what you ask it to. This means any success you have is yours entirely — you did it. This also means you need to own and learn from any mistakes you make. Much of programming is learning to recognize and overcome mistakes.

Here is a simple program in Python:

if __name__ == '__main__':
    print('Hello! Welcome to CS 110!')

there are two important things here:

hello world

  • the main block tells Python this is the start of the program
  • inside the main block you can put statements to tell the program what to do

In this case, we have one print statement, which gives Python a string to print to the terminal.

When you run this program, you will see something like this:

hello world output

This is a slightly longer program that asks you for your name and then greets you by name:

if __name__ == '__main__':
    name = input("Hello! What's your name? ")
    print()
    print(f"It's great to meet you, {name}.")
    print("I hope you have a great time in CS 110 this semester!")

Don’t worry too much about writing this kind of code just yet. The main thing to know here is that programs can have multiple statements inside the main block.

Where to go from here

The rest of this section of the guide will walk you through the steps needed to get started with programming. You can find them all arranged for you in Lab 0 — Getting Started. You’ll work on this with a friend in a lab section.

Have a great time learning how to program!