Index

Symbols

: (colon), creating functions, 6162

(dot) operator, 146148, 193

" (double-quotes)

avoid using with True/False, 31

create strings, 2627

create strings with single-quotes vs., 29

escaping inside strings, 3436

prompt and pass, 47

>= (greater-than-equal) operator, 1617, 97

+= (increment by) operator, 6970, 105

<= (less-than-equal) operator, 1617, 97

- (minus) operator, 1617

!= (not equal) operator, 9798, 100102

' (single-quotes)

create strings, 2627

create strings with double-quotes vs., 29

escaping inside strings, 3436

indicating strings, 57

''' (triple-single-quotes), 36

""" (triple-quotes)

dedent function, 170175

errors when putting spaces between, 33

escaping inside strings, 34, 36

/ (slash) character, 1617, 257

(backslash) character, 3334, 257

\ (double backlash) character, 36

_ (underscore) character, 2021, 62, 189

+ (plus) operator, 1617, 54

== (equal) operator

function of, 21

practicing Boolean logic, 100102

in truth tables, 98

as truth term, 97

= (single-equal) operator, 21

# (pound or octothorpe) character, 12, 1415, 17

% (percent) operator, 16, 1718

* (asterisk) operator, 1617

[] left and right brackets, lists, 112114

^ (caret) character, view output, 11

{} characters, embedded variables in strings, 2425

< (less than) operator, 1617

<>, != (not equal) vs., 102

> (greater than) operator, 1617, 91

A

activate script, Powershell, 195

Addresses, web, 225

altered() function, inheritance, 180183

Alternative text editors, 67

and

in Boolean logic, 100102

as truth term, 9698

app.py

build first website, 217221

create game engine, 239241

create HTML forms, 228229

how forms work, 226227

write automated tests for forms, 231232

app_tests.py file, 231, 241

apropos command, 252

*args, 6062

Arguments, creating functions, 62, 66

argv

as argument variable, 42

prompting and passing using, 4647

reading and writing files, 54

reading files, 4850

unpacking, 4244

using input() vs., 44

Arrays, lists vs., 114

ASCII (American Standard Code for Information Interchange), 8081

assert_equal() function, automated testing, 201203

assert_raises() function, writing test expected to fail, 215

asterisk (*)operator, 1617

Atom text editor

alternatives to, 67

Linux setup, 45

macOS setup, 2

Windows setup, 34

working with first program, 9

Automated tests

for forms, 232

improving, 242

overview of, 200203

refactoring gothonweb game using, 238239

test first with, 206207

B

Backslash () character, 3334, 257

Bash references, 283

Big5 encoding, 85

bin directory, skeleton project directory, 198

Bits, 81, 82

Blocks of code, 106110

Boolean logic

memorizing vs. learning, 98

practicing, 100102

rules for if-statements, 126

Bottom up processes, vs. top down, 169

Brackets ([]), lists, 112114

Branches and functions, 122124

Breaking files, 85, 92, 232

Browser

create engine to run game in, 234241

getting input from. See Input, getting from browser

how it accesses information, 225226

Bytes

breaking files, 85

conventions for encoding, 8081

defined, 78

dissecting code, 8284

dissecting output, 82

C

C3 algorithm, super() function, 183

Cardinal numbers, lists, 120121, 137

caret (^) character, view output, 11

cat command, print whole file, 57, 252, 278279

cd command, change directory

macOS/Linux, 251

overview of, 258260

Windows, 252

cd~ command, 255

Characters

encoding. See Strings, bytes, and character encodings

importance of learning names of, 76

for truth terms, 9697

Checklist, creating function, 62

Child classes. See Inheritance vs. composition

Classes

adds consistency to program, 146

as blueprints for new mini-modules, 149

code and test in OOP, 167169

design hierarchy in OOP, 166167

inheritance vs. composition. See Inheritance vs. composition

object-oriented phrase drill, 152153

object-oriented reading test, 154155

object-oriented word drill, 152

researching Python, 137

similarity to modules, 147148

styling, 189

as templates minting new objects, 186

CLI (command line interface), using on GUI, 261

close command, close file, 5253

Code

avoid hard coding filenames, 48

blocks of, 106107

classes/testing, 167169

create one line of, 57

finding errors in, 132

inheritance vs. composition for reusable, 185

OOP analysis and design, 170176

parser, 211214

practicing English to, 155

reading, 132

reading backward. See Reading code backward

reading phrases, 156

refactoring for gothonweb game, 234239

researching piece of, 78

styling, 190

testing other programmer’s, 94

typing into Terminal/PowerShell, 50

Colon (:), creating functions, 6162

Colors, in text editors, 12

Command-line crash course

change directory (cd), 258261

copy file (cp), 272275

exit your terminal (exit), 282

how to use appendix, 248249

introduction, 248

list directory (ls), 261265

make directory (mkdir), 255257

make empty files (touch/New-Item), 271272

memorizing things, 249

move around (pushd, popd), 268271

move file (mv), 275276

paths, folders, directories (pwd), 253255

PowerShell references, 283

remove directory (rmdir), 265268

remove file (rm), 280281

setup, 249253

stream file (cat), 278279

Unix Bash references, 283

view file (less/more), 277278

Command line interface (CLI), using on GUI, 261

Commands

converting arguments to strings, 44

as functions and methods, 50

learning, 44

Comments

adding when reading code, 132

creating functions with, 6566

designing/debugging with, 127

functions/files with, 69

getting help with documentation, 92

is-a/has-a relationships using, 159160

reading/writing files using, 53

using in Python, 1415

variable names, 21

writing good, 190

writing when you do not understand code, 29, 124

Composition

defined, 152

overview of, 184185

when to use inheritance or, 185

Connections, web, 225226

Conventions, for encoding text, 8081

Copying files, writing script for, 5658

cp, copy file or directory

macOS/Linux, 251

overview of, 272275

Windows, 252

curl command, generate request types, 232

D

Data structures

dictionaries as, 140144

lists as common, 136137

Data types, list of, 129

DBES (Decode Bytes, Encode Strings), dissecting code, 8384

Debugging

designing and, 126127

fixing errors in first website, 219

refactored code, 241

Decisions, making, 108110

dedent() function, """-style strings, 170175

def (create function)

branches and functions, 122124

create game engine, 239241

defined, 152

files working with functions, 6870

functions can return something, 7274

functions working with variables, 9093

is-a/has-a relationships, 159160

overview of, 6062

in reading test, 154155

del keyword, delete from dictionary, 141

Designing and debugging, 126127

dict

how forms work, 227

understanding dictionaries, 140144

Dictionaries

example of, 141143

functions of, 143144

lists vs., 140141

modules similar to, 146147

store scenes by name in, 175

die function, if-statement rules, 126

dir -r, find files in Windows, 253

Directories

causes of ImportErrors, 209

“Hello World” web application, 217

Linux/macOS command-line for, 251

skeleton project. See Skeleton project directory

Windows command-line for, 252

Django Tutorial, 244

Documentation

check out projects/build something using, 244

getting help with comments, 92

writing good comments, 190

Dot (.) operator, 146148, 193

Double backlash (\), 36

Double-quotes. See " (double-quotes)

E

echo, print some arguments, 252, 253

Elements, accessing list, 120121

elif

branches and functions, 122124

and else, 107

making decisions, 108110

else

branches and functions, 122124

and if-statement, 106107

making decisions, 108110

rules for if-statements, 126

Encodings, bytes/character, 8085

env command, look at your environment, 252

Equal operator. See == (equal) operator

Error messages

building first website, 218219

EOFError, 155

ImportError. See ImportErrors

NameError, 47

ParserError, 211214

printing, 29

for spaces between triple-quotes, 33

for spelling mistakes, 33

ValueError. See ValueErrors

variable names, 21

viewing output in first program, 11

when making script shorter, 58

Escape sequences

for different characters in strings, 3435

practicing, 87

reading and writing files, 54

reviewing, 130

supported by Python, 35

except keyword, exceptions, 206

Exceptions

how to raise, 211214

and numbers, 206

exists command, copying files, 5658

exit command, exit shell, 124, 252, 282

export command, export new environment variable, 252

F

f character

embedding variables inside strings, 2425

prompting and passing, 4647

in readline(), 70

using with functions, 69

False keyword

avoid quotes around, 31

object-oriented reading test, 154155

in truth tables, 9798

Features

adding to script, 42

also called modules, 4243

File Transfer Protocol (FTP), and URLs, 225

Filenames, 4850

Files

copying, 5658

creating, 50

and functions, 6870

Linux/macOS command-line for, 251252

reading, 4850

reading and writing, 5254

Windows command-line for, 252253

find command, files, 252

First program, create, 812

flask framework

create basic templates for website, 219221

create game engine, 239241

fix errors, 218219

ImportError after installing, 222

installing for first website, 216

make “Hello World” web application, 216217

testing tricks for creating fake sessions, 242

web.py vs., 221

what is going on, 218

FLASK_DEBUG, not safe to activate on Internet, 219

Flow charts, 132

Folders. See Directories

foo, OOP, 152

for-loops

building lists with, 112114

rules for, 126

when to use lists, 137

while-loops vs., 118

for, OOP, 154155

forfiles, 253

format function, 3031

Format strings

formatter.format(), 30

old style, 130131

overview of, 2425

reading and writing files, 54

.format() syntax, formatting strings, 2627, 30

Forms

automated tests for, 232

creating HTML, 227229

how they work, 226227

FTP (File Transfer Protocol), and URLs, 225

Functions

accessing in module with . (dot) operator, 146147

also called methods/commands, 50

branches and, 122124

can return something, 7274

create checklist for, 62

and files, 6870

overview of, 6062

practicing, 8788, 9093

reading code, 132

replicating implicit inheritance, 184185

styling, 189

using print vs. return in, 93

and variables, 6466, 8788

viewing calls, 137

G

Game, start of your web

creating engine, 239241

overview of, 234

refactoring, 234239

your final exam, 241242

Games

analysis and design. See Object-oriented analysis and design

making your, 188191

gothonweb project

analysis of simple game engine, 165169

code for, 170176

creating layout template, 234239

making into first web application, 217221

refactoring code/creating web engine to run, 234241

Grammar, making sentences, 211, 215

Greater-than-equal (>=) operator, 1617, 97

Greater than (>) operator, 1617, 91

grep command, find things inside files, 252

GUI (graphical user interface), using CLI on, 261

H

Hard coded filenames, avoid, 48

has-a relationships, 152, 158162

“Hello World” web application

create basic templates, 219221

fixing errors, 218219

Help

create system for, 242

getting module, 92

help command, Windows, 253

helpctr command, Windows, 253

Hierarchy, class, 166169

hostname

my computer’s network name, 251, 252

understand URLs, 225

HTML

create basic templates for website, 219221

create forms, 227229

create game engine, 239241

improve appearance of, 242

research, 232

understand response, 226

HTTP

requests, 218, 244

research HTTP REC, 232

understand URLs, 225

I

IDLE, avoid using, 12, 31

if-else, try-except vs., 209

if-statements

branches and functions, 122124

else and, 106107

loops and lists, 112114

make decisions, 8384, 108110

overview of, 104105

read code, 132

rules for, 126

Implicit inheritance

combine with other types of inheritance, 182

composition vs., 184185

overview of, 178179

import

add features to script, 42

copy files, 5658

file with modules, 146

make a game yourself, 188

objects as similar to, 148149

ImportErrors

after installing flask, 222

causes of, 209, 242

create skeleton project directory, 199

Increment by ( +=) operator, 6970, 105

Indentation, 6162, 106

index()

create game engine, 239241

create HTML forms, 229

how forms work, 227

index.GET handler, 224

Inheritance

avoid multiple, 178, 183, 185

object-oriented phrase drill, 152

object-oriented reading test, 154155

object-oriented word drill, 152

Inheritance vs. composition

alter behavior before or after, 180181

implicit inheritance, 179

override explicitly, 180

overview of, 178

reason for super(), 183

three kinds of inheritance combined, 182183

understand composition, 184185

understand inheritance, 178179

using inheritance vs. composition, 185

using super()with __init__(), 183

__init__ function

initializing newly created empty object, 149

in is-a/has-a relationships, 159162

running reliably for parent class, 162

trying not to do too much in, 189

using self when making functions for classes, 151

using super()in, 183

input()

asking questions, 3839

entering own values, 74

parameter to ('>'), 124

parameters, unpacking, variables, 4244

prompting and passing, 4647

prompting people, 4041

reading files, 4850

Input, advanced user

our game lexicon, 204206

overview of, 204

test first challenge, 206207

what you should test, 207209

Input, getting from browser

breaking it, 232

creating HTML forms, 227229

creating layout template, 229230

how forms work, 226227

how web works, 224226

writing automated tests for forms, 232

<input> tags, 229230

Instance, 152153

Instantiation, 148149

Internet, flask debugger mode not safe on, 219

Internet research

check out projects/try to build something, 244

find things, 56

functions and files, 69

import statement, 57

object-oriented programming, 137, 151

pydoc, 4041

reading files, 49

int()function, converting command line argument strings, 44

IP addresses, and URLs, 225

is-a relationships, 152, 158162

J

Jinja2 Documentation, template language, 221

K

Keywords, list of, 128129

Kivy, 244

L

Layout template, create, 232

Learn C The Hard Way, 244

Learn Ruby The Hard Way, 244

len() function, 56, 58

less command, view file in macOS/Linux, 252, 277278

Less-than-equal (<=) operator, 1617, 97

Less than (<) operator, 1617

Lexicon, creating game

make sentences. See Sentences, making

overview of, 204206

test first challenge, 206207

what you should test, 207209

Libraries, defined, 43

Linux/macOS

alternative text editors for, 7

get terminal open and working, 250251

project skeleton setup, 192194

setup exercise, 45

Linux/macOS command-line

cat, stream file, 278279

cd, change directory, 258259, 261

cp, copy file or directory, 272, 274275

exit, exit shell, 282

less, view file, 277278

list of commands, 251252

ls, list directory, 262, 265

mkdir, make directory, 256257

mv, move file or directory, 275, 277

pushd, popd (move directory), 268271

pwd, print working directory, 253255

rm, stream file, 278279

rmdir, remove directory, 266, 268

Lists

access elements of, 120121

build using for-loops, 112114

doing things to, 134138

making 2-D, 114

processing lists of things, 78

when to use, 137

localhost

build first website, 218, 221

web connection, 225

Logic

memorizing, 9698

practicing Boolean, 100102

Login, researching web application, 242

Lookup tables, dictionaries as, 144

Loops

and lists, 112114

for-loops. See for-loops

making infinite, 124

rules for, 126127

while-loops. See while-loops

lpthw virtual environment, skeleton project, 193, 195

ls, list directory

macOS/Linux, 251

overview of, 261265

Windows, 252

M

macOS. See Linux/macOS

main function, dissecting code, 83

man, read manual page in macOS/Linux, 252

Map class

gothonweb project code, 171

storing scenes by name in dictionary, 175

Maps

analysis of simple game engine, 165

completing game, 242

with dictionaries, 143144

match function, parser code, 212

Math, 1618, 39

Memorization

of commands using index cards, 251253

learning command line, 249

of logic, 9698

tips for, 96

Method resolution order (MRO), super(), 183

Methods

also called functions and commands, 50

functions vs., 189

Minus(--) operator, 1617

mkdir, make directory

macOS/Linux, 251

overview of, 255257

Windows, 252

Modifiers, reading and writing files, 54

Modules

causes of ImportErrors, 209

getting help for, 92

overview of, 146147

replicating implicit inheritance in, 184185

using classes vs., 147148

more command, view file in Windows, 252, 278

MRO (method resolution order), super(), 183

Multiple inheritance, avoid, 178, 183, 185

mv command, move file or directory

macOS/Linux, 251

overview of, 275277

Windows, 252

N

NameError message, 47

Names

creating function, 62, 189

define modules, 4243

filenames, 4850

importance of learning symbol, 76

variable, 2022, 6062

Natural Language Tool Kit, 244

Nested structures

lists as, 112

rules for if-statements, 126

new-item command, create empty files in Windows, 271272

None, for some functions, 93

nosetests command

automated tests, 201203

automated tests for forms, 231

create skeleton project directory, 197199

syntax error, 203

not

in Boolean logic, 100102

in truth tables, 9798

as truth term, 97

Not equal (!=) operator, 9798, 100102

Nouns, object-oriented programming, 164167

Numbers

access elements of lists, 120121

exceptions and, 206

index lists into, 140141

input to do math, 39

and math, 1618

between range of numbers, 110

rounding floating point, 25

O

Object-oriented analysis and design. See also Game, start of your web

analysis of simple game engine, 165

code classes and test to run them, 167169

code for “Gothons from Planet Percal #25,” 170176

create class hierarchy/object map for concepts, 166167

extract/research key concepts, 166

overview of, 164165

repeat and refine, 169

top down vs. bottom up, 169

what you should see, 176

write or draw about problem, 165

Object-oriented programming (OOP)

inheritance vs. composition. See Inheritance vs. composition

Python as, 146

research, 137, 151

speak, 152156

Objects

classes as templates that mint new, 186

make sentences with, 210211

object-oriented phrase drill, 152153

object-oriented word drill, 152

parser code, 212215

similar to import, 148149

Octothorpe (#) character, 12, 1415, 17

open command, reading and writing files, 5254

Operators

finding more Python equality, 102

list of, 131132

math, 1617

variable name, 2022

or

in Boolean logic, 100102

in truth tables, 9798

as truth term, 96

Order, maintain with lists, 137

Ordinal numbers, lists, 120121

Output

of first program, 1011

“Hello World” web application, 217

override() function, inheritance, 189

P

Pandas, 244

Paragraphs, if-statement rules, 126

Parameters, reading and writing files, 54

Parent classes. See Inheritance vs. composition

Parser

code, 211214

playing with, 214215

ParserError exception, 211214

Passing, prompting and, 4647

PEMDAS acronym, order of math operations, 18

Percent (%) operator, 16, 1718

Phrase drills, object-oriented, 152156

pip3.6 (or just pip)

create skeleton project directory, 192195, 198199

install flask to build first website, 216

planisphere.py file, 234238

planisphere_tests.py file, 238239

Plus (+) operator, 1617, 54

popd command, pop directory

macOS/Linux, 251

overview of, 268271

Windows, 252

Ports, web connections, 225

POST

automated tests for forms, 231

creating HTML forms, 227229

Pound (#) character, 12, 1415, 17

PowerShell

create game engine, 240

in first program, 1112

references, 283

typing code into, 50

Windows 10 setup for, 34, 195, 250251

print

debug with, 127

read code using, 132

when functions use return vs., 93

Print strings

with more complicated formatting, 3031

more exercises in, 2829, 3233

using escape sequences, 3436

variables, 2425

print_a_line, pass in current line number, 6869

print_line function, dissecting code, 8384

print_two function, create functions, 6061

Programming languages

advice from old programmer, 246247

check out projects/try to build something, 244

how to learn new, 245

learning command line. See Command-line crash course

Project skeleton, 192194

Prompts

identify in appendix exercises, 254

and passing, 4647

people, 4041

Prototype languages, 186

Pseudo code, test first using, 207

pushd command, push directory

macOS/Linux, 251

overview of, 268271

Windows, 252

pwd command, print working directory

macOS/Linux, 251

overview of, 253255

Windows, 252

.py files, passing variables to script, 4244

pydoc command, prompt people, 4041

PyGame, 244

PYTHONPATH environment variable, 240

Q

quit() function, reload Python after, 92

R

raise keyword, exceptions, 211, 213214

range() function, loops, 114

Raw bytes, 79, 8284

read command, read contents of file, 5254

Reading

code, 132

code out loud, 190

files, 4850

and writing files, 5254

Reading code backward

comments and pound characters, 14

defined, 88

printing, 29

reasons for, 15

understanding how to, 22

readline() function, 5253, 68, 70, 83

Refactoring code, 234239

render_template()function, 220221

request.args, forms, 227

Requests, web

generating types of with curl, 232

learn client side of HTTP, 244

process, 224225

understand, 225

Responses, web, 226

return

functions, 7274

object-oriented reading test, 155

when functions use print vs., 93

rm, stream file, 280281

rmdir command, remove directory

macOS/Linux, 251

overview of, 265268

Windows, 252

Room class

automated tests, 201203

create game engine, 239241

refactor code for gothonweb game, 234239

round() function, floating point numbers, 25

Rules

for if-statements, 126

for loops, 126127

when to use inheritance or composition, 185

runas command, danger in windows, 252

S

Scanning input, lexicon tuples, 205, 209

Scenes (rooms)

analysis of simple game engine, 165167

code classes for simple game, 167169

gothonweb project code, 170176

making game yourself, 188191

what you should see, 176

SciPy, 244

ScraPy, 244

Scripts

linking functions to, 61

making decisions, 107

passing variables to, 4244

Search engines

finding things on Internet, 56

how to type # (octothorp) character, 15

seek() function

defined, 5253

does not set current line to 0, 70

research for file, 69

select-string command, find things inside Windows files, 253

self

__init__ function, 148, 151

is-a/has-a relationships and, 159160

object-oriented language, 152155

Sentences, making

breaking up, 205

exceptions, 211

grammar, 211

match and peek, 210211

overview of, 210

parser code, 211215

what you should test, 215

Servers, how browsers access information on, 226

set command, export/set new environment variable in Windows, 253

Setup exercise

alternative text editors, 67

finding things on Internet, 56

Linux, 45

macOS, 23

overview of, 2

warnings for beginners, 6

Windows, 34

setup.py file, skeleton project directory, 196, 198199

Single-equal (=) operator, 21

Single-quotes. See ' (single-quotes)

Skeleton project directory

automated testing, 200203

creating directory structure, 195197

macOS/Linux setup, 192194

overview of, 192

required quiz, 198

testing setup, 197198

using, 198

Windows 10 setup, 194195

skip keyword, parser code, 213

Slash (/) character, 1617, 257

Space

adding around operators for easier reading, 22

make code readable with vertical, 190

Spelling mistakes, error messages for, 33

Stop words, parser code, 213

Strings

across multiple lines, 3436

complicated formatting of, 3031

convert command line arguments to, 44

decode bytes and encode, 8384

embed variables inside, 2425

exercise in printing, 2829

list of escape sequences for, 130

list of old style formats for, 130131

lists mixed with, 135136

pound characters in, 15

read/write files in, 54

start new line in, 33

and text, 2627

understanding, 26

as UTF-8 encoded sequence of characters, 82

Strings, bytes, and character encodings

breaking it, 85

dissect code, 8284

dissect output, 82

encodings deep dive, 8485

initial research, 7880

overview of, 78

switches and conventions, 8081

Styling

code, 190

functions and classes, 189

Subject

parser code, 212215

of sentences, 210211

sudo command, 252

super() function, inheritance, 180183

Switches, 8081

Symbols

data types, 129

escape sequences for strings, 130

keywords, 128129

learning names of, 76

old style string formats, 130131

operators, 131132

reading code, 132

SyntaxError message

EOL, 58

invalid syntax, 12, 93

prompting and passing, 47

pydoc, 41

viewing output in first program, 11

System site packages, setup for skeleton project, 193

T

Tables

dictionaries as lookup, 144

truth, 9798

Templates

create basic, 219221

create game engine, 239241

create HTML forms, 229

create layout, 229230

templates/index.html file, 219221, 229230

templates/layout.html file, 230

TensorFlow, 244

Terminal

getting open and working, 250251

Linux setup, 5

macOS setup, 23

typing code into, 50

what you should see in first program, 911

Windows setup, 34

Terminology

truth, 9697

web application, 225226

Test case, writing, 200201

Test first programming tactic, 206207

Test_directions test case, 207209

Tests. See also Automated tests

Boolean logic, 100102

code for classes in OOP, 168169

object-oriented reading, 153155

other programmer’s code, 94

session-based game engine, 241

skeleton project directory setup, 197198

tricks for creating fake sessions inside, 242

tests/app_tests.py, 231

Test.txt file, copying files, 5658

Text

reading files, 4850

and strings, 2627

Text editors

alternative, 67

getting colors in, 12

Linux setup, 45

macOS setup, 2

Things, getting things from, 149150

Top down process

OOP design, 164

vs. bottom up, 169

touch command, make empty files in macOS/Linux, 271272

Tracing variables, reading code, 132

Triple-quotes ("""). See """ (triple-quotes)

Triple-single-quotes ('''), 36

True keyword

avoid putting quotes around, 31

object-oriented reading test, 154155

in truth tables, 9798

as truth term, 97

truncate command, 5254

Truth

tables, 9798

terms, 9697

try-except, if-else vs., 209

try keyword, exceptions, 206

Tuples, lexicon, 205

type command, print whole file in Windows, 252

U

Underscore (_) character, 2021, 62, 189

Unicode, 81

URLs (Uniform Resource Locators)

build first website, 218

create HTML forms, 228

how forms work, 227

overview of, 225

User input. See Input, advanced user

UserWarning, when running nosetests, 203

UTF-16 standard, 8485

UTF-8 standard

comparing UTF-16/UTF-32 to, 8485

dissecting output, 82

encoding text in Python, 81

fixing terminal unable to display, 79

strings in Python, 8284

V

ValueErrors

and numbers, 206

parameters/unpacking/variables, 44

prompting/passing, 47

Variables

access in module, 146147

avoid module or global, 189

and functions, 6466

for-loop using undefined, 114

and names, 2022

and names/code/functions, 6062

passing to script, 4244

practicing, 9093

printing, 2425

prompting and passing, 4647

reading code, 132

temporarily inside functions, 8788

writing strings with text, 2627

.venvs directory, skeleton project setup, 193195

Verbs

analyze class hierarchy in OOP, 165

extract key concepts in OOP, 164

make sentences with, 210211

parser code, 212215

virtualenv, 192193, 194

W

Warnings

for beginners, 56

setup, 2

Web

breaking applications, 232

how it works, 224226

learn client side of, 244

start of your game. See Game, start of your web

Website, your first

create basic templates, 219221

fixing errors, 218219

install flask framework, 216

make “Hello World” web application, 216217

what is going on, 218

while-loops

overview of, 116118

reading code, 132

rules, 126

when to break rule about not using, 138

while True, make infinite loop, 124

Windows

alternative text editors for, 7

setup exercise, 34

skeleton project directory setup, 194195

Windows command-line

cat, stream file, 259261, 278279

cp, copy file or directory, 272275

exit, exit shell, 282

getting PowerShell open and working for, 250251

list of commands, 252253

ls, list directory, 262265

macOS setup, 2

more, view file, 278

mv, move file or directory, 275277

pushd, popd (move directory), 269271

pwd, print working directory, 254255

rm, stream file, 278279

rmdir, remove directory, 266268

Word drills, object-oriented, 152155

words.pop function, 93

Write

formulas using functions, 74

and read files, 5254

X

xargs command, execute arguments, 252

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.234.139.149