Anybase to Decimal
Integer
1. Start with the leftmost digit
2. Multiply by the source base
3. Add the next digit to the right
4. Continue 2 and 3 until you reach the ones column
5. Add the digit in the ones column
Fraction
1. Start with the rightmost digi
Numeric Data Types
The first applications of computers were to crunch numbers. Although text and media
processing have lately been of increasing importance, the use of numbers in many applications is
still very important. In this section, we give a brief
Enter Python home URL, http:/www.python.org, into the location box of your browser. The
above page will appear. Next, choose the Download link at the left. This will bring you to the
following screen.
Next, choose the Releases link at the left and the fol
Numbering Systems
(Part Three)
In this section:
Binary Arithmetic Operations
BCD Representation
Negative Numbers and Complements
Overflow and Carry
Floating point representation
CS230: Fundamentals of Computing (Spring 2016)
Numbering Systems > Part
Introduction
(Part Two)
In this section:
What Is Programming?
Is Programming Hard?
Software
This Course: How Is It Useful?
Misconceptions About Programming This Course: What It Covers
Programming and People
CS230: Fundamentals of Computing (Spring 2
Computation
(Part One)
In this section:
Computation Basics Selection
Expressions
Iteration
Statements
Control Statement Examples
Control Statements
CS230: Fundamentals of Computing (Spring 2016)
Computation > Part One
Computation Basics: A Review
Co
Objects, Types, and
Values
In this section:
Objects
Input Functions
Types
Type Conversion
Arithmetic Operators
CS230: Fundamentals of Computing (Spring 2016)
Objects, Types, and Values
Objects
Our Hello, World! and Lab #1 programs displayed simple
me
Numbering Systems
(Part Two)
In this section:
Binary to Decimal Conversion
Decimal to Binary Conversion
Alternative Representations
Introducing Hexadecimal
CS230: Fundamentals of Computing (Spring 2016)
Numbering Systems > Part Two
What Are Numbers? (
Logic and Truth Tables
In this section:
Formal Logic Well Formed Formulas
Statements Tautologies and Contradictions
Connectives Equivalence Rules
Truth Tables
CS230: Fundamentals of Computing (Spring 2016)
Logic and Truth Tables
Formal Logic
What is f
Hello, World!
In this section:
Programming Basics
Sample Program: Hello, World!
Fundamental Program Elements
Programming Errors
CS230: Fundamentals of Computing (Spring 2016)
Hello, World!
Programming
In order to get a computer to do something, we mu
Computation
(Part Two)
In this section:
Programming Ideals (a review)
Functions
Data Structures: Lists
Methods (Lists and Strings)
CS230: Fundamentals of Computing (Spring 2016)
Computation > Part Two
Programming Ideals (A Review)
Our ideal as program
Functions
In this section:
Scope
Function Call and Return
Variables in Python
CS230: Fundamentals of Computing (Spring 2016)
Functions
Recap: Why Functions?
Functions divide a program into manageable pieces (the Divide and
Conquer strategy).
Functions
Character Encoding
In this section:
Character Encoding
Unicode
ASCII
UTF-8 Encoding
Extended Character Sets
Code Pages
CS230: Fundamentals of Computing (Spring 2016)
Character Encoding
The Basics
Remember that computers are binary devices, capable
Numbering Systems
(Part One)
In this section:
What Are Numbers?
Numbers vs. Numerals
The Arabic System
The Binary System
CS230: Fundamentals of Computing (Spring 2016)
Numbering Systems > Part One
What Are Numbers?
Numbers are mathematical objects us
Introduction
(Part One)
In this section:
Instructor Information Classroom Etiquette
Catalog Description Classroom Routine
Course Materials
Course Policies
CS230: Fundamentals of Computing (Spring 2016)
Introduction > Part One
Welcome to CS230!
Jay Sne
Set Theory
In this section:
Sets and Elements
Venn Diagrams
Set Symbols
The Algebra of Sets
Elements and Subsets
Counting Principles
Union, Intersection, and Complement
CS230: Fundamentals of Computing (Spring 2016)
Set Theory
Sets and Elements
A s
Flowcharts and Pseudocode
In this section:
Algorithms
Flowcharts
Pseudocode
CS230: Fundamentals of Computing (Spring 2016)
Flowcharts and Pseudocode
Algorithms
An algorithm is a step-by-step list of instructions for solving a
problem. Informally, an al
On your desktop, choose the Start button in the lower left corner of the task bar. Select the
Programs menu, then select the Python 2.X menu (where X is the version number you have
installed on your machine), and finally choose the IDLE (Python GUI) comma
Chapter 4
Logic, Truth Tables
4.1 Introduction
A computer may be programmed to make decisions based on whether certain statements, for
example, the number just computed exceeds 100, are true or false. The truth or falsity of a
statement is its truth value
Dyjkstras Theorem
In 1968, Edsger Dyjkstra published an article about the fundamentals of writing a computer
program. Dyjkstra proposed a theory of programming known as structured programming. He
proposed a theorem: Any program to solve any problem can be
Language Translation
How do you say hot dog in
Spanish?
Educating Professionals
Language
A system of symbols for encoding and
decoding information.
Use to communicate concepts.
Educating Professionals
Purpose of a Language
To communicate and convey con
Fundamentals of Python:
From First Programs Through Data
Structures
Chapter 3
Control Statements
Objectives
After completing this chapter, you will be able to:
Write a loop to repeat a sequence of actions a fixed
number of times
Write a loop to traverse
Fundamentals of Python:
From First Programs Through Data
Structures
Chapter 1
Introduction
Objectives
After completing this chapter, you will be able to:
Describe the basic features of an algorithm
Explain how hardware and software collaborate in
a comp
Data Types
Number
Sequence
Mapping
Files
Educating Professionals
Numeric Data
Plain integer
Called integer
Long integer
Floating point
Complex
Educating Professionals
Sequences
String a seqeunce of characters used to
represent text and delimited wit
Fundamentals of Python:
From First Programs Through Data
Structures
Chapter 5
Lists and Dictionaries
Objectives
After completing this chapter, you will be able to:
Construct lists and access items in those lists
Use methods to manipulate lists
Perform
Fundamentals of Python:
From First Programs Through Data
Structures
Chapter 6
Design with Functions
Objectives
After completing this chapter, you will be able to:
Explain why functions are useful in structuring code
in a program
Employ top-down design t
Fundamentals of Python:
From First Programs Through Data
Structures
Chapter 2
Software Development, Data Types, and
Expressions
Objectives
After completing this chapter, you will be able to:
Describe the basic phases of software
development: analysis, de
IPO diagrams
Input
Process
Output
Figure 1. Empty IPO diagram
IPO stands for input, process, and output. We use IPO diagrams to perform an analysis of a
problem statement. We start the analysis by drawing an empty IPO diagram like the one in
Figure 1. The
Creating an algorithm
In order to create an algorithm, we must have a completed IPO diagram similar to Figure 1.
Number
Calculate
Sum
From user
While counter < number
do the following
To screen
Positive integer
Divide 1 by counter
Positive floating-point
Fundamentals of Python:
From First Programs Through Data
Structures
Chapter 4
Strings and Text Files
Objectives
After completing this chapter, you will be able to
Access individual characters in a string
Retrieve a substring from a string
Search for a