0% found this document useful (0 votes)
165 views

CS 110 Programming Fundamentals - Unit 1 - All Assignments Instructions

This document provides an overview of Unit 1 of a learning guide for a programming fundamentals course. The unit covers fundamental programming concepts, computer programs, debugging, errors, and formal and natural languages. By the end of the unit, students will be able to describe fundamental programming concepts, differentiate high and low-level languages, demonstrate basic debugging techniques, and develop simple calculations in Python. The tasks for students are to read materials, install Python, participate in discussions, complete a learning journal, and take a self-quiz.

Uploaded by

Steafan Taylor
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
165 views

CS 110 Programming Fundamentals - Unit 1 - All Assignments Instructions

This document provides an overview of Unit 1 of a learning guide for a programming fundamentals course. The unit covers fundamental programming concepts, computer programs, debugging, errors, and formal and natural languages. By the end of the unit, students will be able to describe fundamental programming concepts, differentiate high and low-level languages, demonstrate basic debugging techniques, and develop simple calculations in Python. The tasks for students are to read materials, install Python, participate in discussions, complete a learning journal, and take a self-quiz.

Uploaded by

Steafan Taylor
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Learning Guide Unit 1

Overview

Unit 1: Introduction and Fundamental Concepts

Topics:

 Introduction to fundamental programming concepts


 Computer programs
 Debugging
 Errors
 Formal and natural languages

Learning Objectives:
By the end of this Unit, you will be able to:

1. Describe fundamental concepts in computer programming.


2. Differentiate between high and low-level languages.
3. Demonstrate basic debugging techniques.
4. Develop simple calculations in Python.

Tasks:

 Read the Learning Guide and Reading Assignments


 Download and install a working Python environment (not required for PythonAnywhere users).
Refer to the Software Requirements/Installation section of the Syllabus.
 Participate in the Discussion Assignment (post, comment, and rate in the Discussion Forum)
 Complete an entry in the Learning Journal
 Take the Self-Quiz
Introduction

Welcome to Programming Fundamentals. This course introduces fundamental concepts of computer


science by exploring the discipline of computer programming. Throughout this course you will be
challenged to think differently. We have all learned how to speak and write in a language. Many of
us have had to learn more than one language. Regardless of whether the language is English,
Russian, Arabic, Chinese, Thai, Spanish, Portuguese, or any number of other languages, they all
have common elements. Each language has structure, grammar, and vocabulary. As we learn a new
language we must learn to combine these elements together to accomplish our goals, to convey the
message and meaning that we need to convey. 

A computer programming language is no exception to this rule. Each programming language has
structure, grammar, and vocabulary that must be combined to accomplish the goal of the program.
In the spoken or written language, if we don’t use structure, grammar, or vocabulary properly then
we risk not getting our message across. In a computer programming language, if we don’t use these
elements properly then we run the risk that our program will not function as we expect it to, or it will
not function at all.

In each subsequent unit of this course, we will be learning about the structure, grammar, and
vocabulary of the Python programming language. Python is an interpreted language that is object-
oriented. Python is actually a relatively recent language in that it was first developed in 1991. Other
programming languages, such as Fortran, are much older. Fortran was developed by IBM in 1958.
The BASIC programming language was developed in 1964 and Cobol was developed in 1959.

Program development and the problem with insect infestation (BUGS!)

One item that is a part of this history is origin of the concept of a computer bug. As you will learn in
this unit, a computer bug is a defect in coding of a software program that makes the program
operate incorrectly or fail. The process of eliminating problems or errors in a program is known as
‘debugging’.
Reading Assignment

Downey, A. (2015). Think Python: How to think like a computer scientist. Green Tea Press. This
book is licensed under Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC
3.0). Download the pdf.

 Chapter 1 - The Way of the Program

Video Resources

mybringback. (2013, November 15). Learn Python programming tutorial 1 | Installing Python. [Video].
YouTube. http://www.pitt.edu/~naraehan/python2/tutorial1.html or from 
Discussion Assignment

Programming languages like Python are formal languages with strict syntax rules. But those rules
can change over time with newer versions of the programming language. Your textbook covers
Python 3, but you may only have access to Python 2. 

Download and install a working Python environment, preferably Python 3, or get an account with the
Virtual Computer Lab or PythonAnywhere. Refer to the Software Requirements/Installation section
of the course syllabus for details.

Type the statements below into your Python interpreter. For each statement, copy the output into
your Discussion Assignment and explain the output. Compare it with any similar examples in the
textbook, and describe what it means about your version of Python. 

>>> print 'Hello, World!'


>>> 1/2
>>> type(1/2)
>>> print(01)
>>> 1/(2/3) 

When you reply to your peers’ submissions, compare their results with yours.
Learning Journal

Part 1:

Exercise 1.1 from your textbook recommends that you try to make mistakes when experimenting
with a new programming feature. 

This kind of experiment helps you remember what you read; it also helps when you are
programming because you get to know what the error messages mean. It is better to make mistakes
now and on purpose than later and accidentally. (Downey, 2015, 7)

For this Learning Journal, first, answer the following questions based on Exercise 1.1. Include
example Python code and output with your answers.

 If you are trying to print a string, what happens if you leave out one of the quotation marks or
both and why?
 You can use a minus sign to make a negative number like -2. What happens for each of the
following and why?

>>> 2++2
>>> 2--2
>>> 2+-2
>>> 2-+2

 In math notation, leading zeros are OK, as in 02. What happens if you try this in Python and
why?
 What happens if you have two values with no operator and a space in between them and
why?

Part 2:

Next, describe at least three additional Python experiments that you tried while learning Chapter 1.
Show the Python inputs and their outputs, and explain what you learned from the results of each
example. 

References

Downey, A. (2015). Think Python: How to think like a computer scientist. Green Tree Press.
Self-Quiz

The Self-Quiz gives you an opportunity to self-assess your knowledge of what you have learned so
far.

The results of the Self-Quiz do not count towards your final grade, but the quiz is an important part of
the University’s learning process and it is expected that you will take it to ensure understanding of
the materials presented. Reviewing and analyzing your results will help you perform better on future
Graded Quizzes and the Final Exam.

Please access the Self-Quiz on the main course homepage; it will be listed inside the Unit.

You might also like