text.skipToContent text.skipToNavigation
  1. Home
  2. Computer Science & IT
  3. Python in 24 Hours, Sams Teach Yourself

Python in 24 Hours, Sams Teach Yourself, 2nd edition

  • Katie Cunningham

Published by Sams Publishing (October 1st 2013) - Copyright © 2014

2nd edition

Chosen format
View all
Python in 24 Hours, Sams Teach Yourself

ISBN-13: 9780133354461

Includes: Unassigned

This product is not available in your country

What's included

  • Unassigned

Overview

Table of contents

Preface    xiv

Who This Book Is For    xiv

How This Book Is Organized    xiv

Introduction    1

Learning to Program    1

Why Python?    2

Getting Started    2

How This Book Works    3

What to Do If You Get Stuck    3

HOUR 1  Installing and Running Python 5

Discovering Your Operating System    5

Setting Up Python on Windows    7

Setting Up Python on a Mac    11

Summary    15

Q&A    15

Workshop    16

HOUR 2  Putting Numbers to Work in Python    17

Storing Information with Variables    17

Doing Math in Python    20

Comparing Numbers    23

Applying Python Math in the Real World    24

Summary    25

Q&A    26

Workshop    26

HOUR 3  Logic in Programming    27

Using a Basic if Statement    27

Creating Blocks    28

Adding an else to an if    29

Testing Many Things with elif    30

True and False Variables.    31

Using try/except to Avoid Errors    32

Applying Logic to Real-World Problems    34

Summary    35

Q&A    35

Workshop    36

HOUR 4  Storing Text in Strings    37

Creating Strings    37

Printing Strings    38

Getting Information About a String    38

Math and Comparison    40

Formatting Strings.    42

Using Strings in the Real World    46

Summary    47

Q&A    47

Workshop    48

HOUR 5  Processing Input and Output    49

Getting Information from the Command Line    49

Getting a Password    53

Cleaning Up User Input    54

Formatting Output    55

Managing Input and Output in the Real World    57

Summary    58

Q&A    58

Workshop    58

HOUR 6  Grouping Items in Lists    61

For teachers

All the material you need to teach your courses.

Discover teaching material