Unit1 Introduction
Unit1 Introduction
Introduction to Programming
Fall Quarter 2022
Unit 1
Introduction
Dr. Kristian Stevens
“Computer science is the new math”
–Christos Papadimitriou
Welcome to ECS32A!
• Our goal this quarter is to learn how to write programs.
• You will nd many times that the programs you can buy are not
exactly what you need, or data you have is not in the format you
want. Programming is a solution to this.
• With this skill will be able to handle much larger and more
complex problems yourself.
fi
Python!
https://octoverse.github.com
Why is Python so Popular?
Portability
Software quality
Developer productivity
#include<iostream>
using namespace std;
int main()
C++ {
cout<<"Welcome to ECS32A!";
return 0;
}
public class Main{
public static void main(String[] args)
Java {
System.out.println("Welcome to ECS32A!");
}
}
Python programs are typically 3-5 times shorter than equivalent Java
programs and 5-10 times shorter than equivalent C++ programs.
Rapid Development
There are a number of features that make Python
programs quicker to write and easier to debug:
ECS32A
Example of What You’ll Learn
Example of What You’ll Learn
Average July temperature anomaly in
Sacramento from 1880 to Present
Noisy!
Example of What You’ll Learn
Same data after moving average to
decrease noise.
1935
Social Security Act Signed
1937
600,000 cards
were
processed
each day
Social Security Card
Application Database
Over
450,000,000
cards issued
as of 2018
We can calculate
the popularity of
any baby name
from 1880 to now
Book Art
Visualize
the important
words in a text
at a glance.
Course Overview
& Getting Started
ECS32A
Course Outline
Week Topic Chapters
1 Introduction 1 Overview
• Breakdown:
• You will get 50% credit on any additional points submitted after
the deadline. This is added at the end of the quarter.
• Breakdown:
During the rst week of discussion sections, TAs will guide you
through installing Python, using our Jupyter Hub, and using
Gradescope to submit a homework assignment.
A discussion topic will typically run for a week and will be chosen
based on the upcoming homework assignments or exams.
fi
Jupyter Notebooks is rapidly gaining in popularity.
It is another technology you will use in this course.
Popularity of Jupyter Notebooks
https://octoverse.github.com
ECS32A
Discussion Boards
• TAs and Tutors will be present on Piazza 7 days a week for
help.
• You will also meet the tutors at our Stay Late and
Code Nights.
fi
Engaging with the Material
• Use our Piazza site to ask and answer questions.
• Use the interactive textbook, you can run and modify many of the code
examples. For additional practice with coding, consider doing the
exercises at the end of assigned chapters.
• Lectures will include links to Python Tutor demonstrations. These are links
to programs that you can step through in your own time.
• For practice taking exams, all Gradescope exams will have corresponding
Gradescope online sample exams with the same format and length.
fi
Getting started!
• Go to Canvas.
ECS32A
Race to Sequence the Human Genome
Specialized programs
Big Data, Python, and Human Genomics
The Python Interpreter
& IDLE
ECS32A
First, a look at our abstract*
computer…
• These are all the ways people interact with the computer.
• Our language, Python, like JAVA, C, C++, Perl, etc., is a formal high-
level programming language designed for humans to work with.
What What
A Python interpreter Next? Next?
interprets programs
line-by-line Central
Processing
Unit
Integrated Development and
Learning Environment
• IDLE is our Python interpreter.
https://www.python.org
(Try it)
Our First Line of Python