𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

An Introduction to Programming and Computer Science with Python

✍ Scribed by Clayton Cafiero


Publisher
Independently Published
Year
2023
Tongue
English
Leaves
402
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


This book has been written for use in University of Vermont’s CS1210 Introduction to Programming (formerly CS021). This is a semester long course which covers much of the basics of programming, and an introduction to some fundamental concepts in computer science. Not being happy with any of the available textbooks, s, I endeavored to write my own.

✦ Table of Contents


Table of contents
Preface
To the student
Acknowledgements
Introduction
Programming and the Python Shell
Why learn a programming language?
Compilation and interpretation
The Python shell
Hello, Python!
Syntax and semantics
Introduction to binary numbers
Exercises
Types and literals
What are types?
Dynamic typing
Types and memory
More on string literals
Representation error of numeric types
Exercises
Variables, statements, and expressions
Variables and assignment
Expressions
Augmented assignment operators
Euclidean or floor'' division Modular arithmetic Exponentiation Exceptions Exercises Functions Introduction to functions A deeper dive into functions Passing arguments to a function Scope Pure and impure functions The math module Exceptions Exercises Style The importance of style PEP 8 Whitespace Names (identifiers) Line length Constants Comments in code Exercises Console I/O Motivation Command line interface The input() function Converting strings to numeric types Some ways to format output Python f-strings and string interpolation Format specifiers Scientific notation Formatting tables Example: currency converter Format specifiers: a quick reference Exceptions Exercises Branching and Boolean expressions Boolean logic and Boolean expressions Comparison operators Branching if, elif, and else Truthy and falsey Input validation Some string methods Flow charts Decision trees Exercises Structure, development, and testing main the Python way Program structure Iterative and incremental development Testing your code The origin of the termbug''
Using assertions to test your code
Rubberducking
Exceptions
Exercises
Sequences
Lists
Tuples
Mutability and immutability
Subscripts are indices
Concatenating lists and tuples
Copying lists
Finding an element within a sequence
Sequence unpacking
Strings are sequences
Sequences: a quick reference guide
Slicing
Passing mutables to functions
Exceptions
Exercises
Loops and iteration
Loops: an introduction
while loops
Input validation with while loops
An ancient algorithm with a while loop
for loops
Iterables
Iterating over strings
Calculating a sum in a loop
Loops and summations
Products
enumerate()
Tracing a loop
Nested loops
Stacks and queues
A deeper dive into iteration in Python
Exercises
Randomness, games, and simulations
The random module
Pseudo-randomness in more detail
Using the seed
Exercises
File I/O
Context managers
Reading from a file
Writing to a file
Keyword arguments
More on printing strings
The csv module
Exceptions
Exercises
Data analysis and presentation
Some elementary statistics
Python's statistics module
A brief introduction to plotting with Matplotlib
The basics of Matplotlib
Exceptions
Exercises
Exception handling
Exceptions
Handling exceptions
Exceptions and flow of control
Exercises
Dictionaries
Introduction to dictionaries
Iterating over dictionaries
Deleting dictionary keys
Hashables
Counting letters in a string
Exceptions
Exercises
Graphs
Introduction to graphs
Searching a graph: breadth-first search
Exercises
Appendices
Glossary
Mathematical notation
pip and venv
File systems
Code for cover artwork
Index


πŸ“œ SIMILAR VOLUMES


Python Programming: An Introduction to C
✍ John M. Zelle πŸ“‚ Library πŸ“… 2003 πŸ› Franklin Beedle & Associates 🌐 English

This book is designed to be used as the primary textbook in a college-level first course in computing. It takes a fairly traditional approach, emphasizing problem solving, design, and programming as the core skills of computer science. However, these ideas are illustrated using a non-traditional lan

Python Programming: An Introduction to C
✍ John M. Zelle πŸ“‚ Library πŸ“… 2003 πŸ› Franklin, Beedle & Associates, Inc. 🌐 English

This book is suitable for use in a university-level first course in computing (CS1), as well as the increasingly popular course known as CS0. It is difficult for many students to master basic concepts in computer science and programming. A large portion of the confusion can be blamed on the complexi

Python Programming: An Introduction to C
✍ John M. Zelle πŸ“‚ Library πŸ“… 2016 πŸ› Franklin, Beedle & Associates 🌐 English

This book is designed to be used as a primary textbook in a college-level first course in computing. It takes a fairly traditional approach, emphasizing problem solving, design, and programming as the core skills of computer science. However, these ideas are illustrated using a non-traditional langu

Python Programming: An Introduction to C
✍ John M. Zelle πŸ“‚ Library πŸ“… 2016 πŸ› Franklin Beedle & Associates 🌐 English

This third edition of John Zelle's Python Programming continues the tradition of updating the text to reflect new technologies while maintaining a time-tested approach to teaching introductory computer science. An important change to this edition is the removal of most uses of eval and the addition