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

Ch1 Introductions

This document provides an overview and objectives for an introduction to computing for engineers course. It outlines the topics to be covered in each class session, including introductions to Python programming basics, variables, functions, input/output, errors, and whitespace. The course materials will be provided through HuskyCT and zyBooks, and students will complete reading assignments, participation activities, challenge questions, labs, and homework each week.

Uploaded by

paigecowens
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Ch1 Introductions

This document provides an overview and objectives for an introduction to computing for engineers course. It outlines the topics to be covered in each class session, including introductions to Python programming basics, variables, functions, input/output, errors, and whitespace. The course materials will be provided through HuskyCT and zyBooks, and students will complete reading assignments, participation activities, challenge questions, labs, and homework each week.

Uploaded by

paigecowens
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to Computing for Engineers

CSE 1010

Introduction
zyBooks Chapter 1
Today's Objectives

• Introductions
• Overview of Course
• Understanding of Course Objectives/Expectations
• Have Access to Necessary Resources
– Husky CT
– zyBooks

28 August 2023 CSE 1010 2


Introductions

• Name (Kem-sick)
• Educational Goals
– Current place in your academic history
– Major
• Computer Science Achievement

28 August 2023 CSE 1010 3


HuskyCT Contents

• Syllabus
• Schedule
• zyBooks

28 August 2023 CSE 1010 4


Section 1.1: Python (Programming)
Basics
• A computer program consists of instructions executing one at a
time.
Input Output
Process

• Variable Assignment:
– Syntax: name = ‘Chris’
– What goes on: The value ‘Chris’ is assigned to name
– Reading left-to-right: name is being assigned the value ‘Chris’
– The value of name can be changed: name = ‘John’
• We write programs to run the same process on different valued
inputs
28 August 2023 CSE 1010 5
Section 1.2 Programming Using
Python
• An interactive interpreter is a program that allows the user to execute one
line of code at a time.
• Code is a common word for the textual representation of a program
• A line is a row of text.

• A statement is a program instruction. A program mostly consists of a


series of statements, and each statement usually appears on its own line.
• Expressions are code that return a value when evaluated; for example,
the code wage * hours * weeks.
• A new variable is created by performing an assignment
name = ‘Chris’
• The print() function displays values (and includes a CR/LF).
• '#' characters denote comments.
28 August 2023 CSE 1010 6
System Perspective Code
Organization
# Not System Perspective # System Perspective
# Input (definition)
hourly_wage = 20
hourly_wage = 20
# Process
print('Annual salary is: ‘) Annual = hourly_wage*40*50
print(hourly_wage * 40 * 50) Monthly = hourly_wage*40*50/12
print() # Monthly = Annual/12

print('Monthly salary is: ‘) #Output


print('Annual salary is: ‘)
print(((hourly_wage * 40 *
print(Annual)
50)/12))
print()
print()
print('Monthly salary is: ‘)
print(Monthly)
print()
28 August 2023 CSE 1010 7
Section 1.3 Basic Input/Output

• Strings in quotes: Either ‘Hello’ or “Hello”


• Suppress the CR/LF of a print() statement:
print(‘Hello’, end = ‘’)
print(‘Bye’)
> HelloBye
• Add a CR/LF:
print(‘Hello’) Single space (LF)
print(‘Hello\n’) Double spaced
• Output multiple items in single print() statement (no LF
between)
print(‘Bob has ’, n, ‘ cats.’)
> Bob has 5 cats. (CR/LF)
28 August 2023 CSE 1010 8
Section 1.3 Basic Input/Output
(Cont.)
• input() command accepts input from the user
(keyboard by default)
• Inputs (from the keyboard) are ALWAYS strings.
Even it’s a number that is input
• You must provide zyBooks with the input keystrokes
(i.e., what are the exact keys the user would type)

28 August 2023 CSE 1010 9


Section 1.4: Errors

• A syntax error, is to violate a programming language's


rules on how symbols can be combined to create a
program.
• Write perhaps a few (3–5) lines of code and then fix
errors
• A runtime error occurs when a program's syntax is
correct but the program attempts an impossible
operation
• See Table 1.4.1 for various types of errors

28 August 2023 CSE 1010 10


Section 1.5

• whitespace is any blank space or newline:


– Spaces
– Tabs
– Line Feeds
• You must be precise
• Attention to Detail!
Do Participation Activity 1.5.3 at the end

28 August 2023 CSE 1010 11


Next Class

• Week of 28 August – Chapter 1 Reading,


Participation, and Challenge Questions
• Week of 4 September
– Chapter 1 Labs
– Chapter 2 Reading, Participation, and Challenge Questions
• Week of 11 September – Chapter 1 Homework Due
– Chapter 1 Homework
– Chapter 2 Labs
– Chapter 3 Reading, Participation, and Challenge Questions

28 August 2023 CSE 1010 12

You might also like