𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

The Python Workbook: A Brief Introduction With Exercises and Solutions

✍ Scribed by Ben Stephenson


Publisher
Springer-Nature New York Inc
Year
2015
Tongue
English
Leaves
169
Edition
2014Β°
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


While other textbooks devote their pages to explaining introductory programming concepts, The Python Workbook focuses exclusively on exercises, following the philosophy that computer programming is a skill best learned through experience and practice. Designed to support and encourage hands-on learning about programming, this student-friendly work contains 174 exercises, spanning a variety of academic disciplines and everyday situations. Solutions to selected exercises are also provided, supported by brief annotations that explain the technique used to solve the problem, or highlight specific points of Python syntax. No background knowledge is required to solve the exercises, beyond the material covered in a typical introductory Python programming course.Β 


Undergraduate students undergoing their first programming course and wishing to enhance their programming abilities will find the exercises and solutions provided in this book to be ideal for their needs.

✦ Table of Contents


Preface
Contents
Part IExercises
1 Introduction to Programming Exercises
Exercise 1: Mailing Address
Exercise 2: Hello
Exercise 3: Area of a Room
Exercise 4: Area of a Field
Exercise 5: Bottle Deposits
Exercise 6: Tax and Tip
Exercise 7: Sum of the First n Positive Integers
Exercise 8: Widgets and Gizmos
Exercise 9: Compound Interest
Exercise 10: Arithmetic
Exercise 11: Fuel Efficiency
Exercise 12: Distance Between Two Points on Earth
Exercise 13: Making Change
Exercise 14: Height Units
Exercise 15: Distance Units
Exercise 16: Area and Volume
Exercise 17: Heat Capacity
Exercise 18: Volume of a Cylinder
Exercise 19: Free Fall
Exercise 20: Ideal Gas Law
Exercise 21: Area of a Triangle
Exercise 22: Area of a Triangle (Again)
Exercise 23: Area of a Regular Polygon
Exercise 24: Units of Time
Exercise 25: Units of Time (Again)
Exercise 26: Current Time
Exercise 27: Body Mass Index
Exercise 28: Wind Chill
Exercise 29: Celsius to Fahrenheit and Kelvin
Exercise 30: Units of Pressure
Exercise 31: Sum of the Digits in an Integer
Exercise 32: Sort 3 Integers
Exercise 33: Day Old Bread
2 If Statement Exercises
Exercise 34: Even or Odd?
Exercise 35: Dog Years
Exercise 36: Vowel or Consonant
Exercise 37: Name that Shape
Exercise 38: Month Name to Number of Days
Exercise 39: Sound Levels
Exercise 40: Name that Triangle
Exercise 41: Note To Frequency
Exercise 42: Frequency To Note
Exercise 43: Faces on Money
Exercise 44: Date to Holiday Name
Exercise 45: What Color is that Square?
Exercise 46: Season from Month and Day
Exercise 47: Birth Date to Astrological Sign
Exercise 48: Chinese Zodiac
Exercise 49: Richter Scale
Exercise 50: Roots of a Quadratic Function
Exercise 51: Letter Grade to Grade Points
Exercise 52: Grade Points to Letter Grade
Exercise 53: Assessing Employees
Exercise 54: Wavelengths of Visible Light
Exercise 55: Frequency to Name
Exercise 56: Cell Phone Bill
Exercise 57: Is it a Leap Year?
Exercise 58: Next Day
Exercise 59: Is a License Plate Valid?
Exercise 60: Roulette Payouts
3 Loop Exercises
Exercise 61: Average
Exercise 62: Discount Table
Exercise 63: Temperature Conversion Table
Exercise 64: No More Pennies
Exercise 65: Compute the Perimeter of a Polygon
Exercise 66: Compute a Grade Point Average
Exercise 67: Admission Price
Exercise 68: Parity Bits
Exercise 69: Approximate Ο€
Exercise 70: Caesar Cipher
Exercise 71: Square Root
Exercise 72: Is a String a Palindrome?
Exercise 73: Multiple Word Palindromes
Exercise 74: Multiplication Table
Exercise 75: Greatest Common Divisor
Exercise 76: Prime Factors
Exercise 77: Binary to Decimal
Exercise 78: Decimal to Binary
Exercise 79: Maximum Integer
Exercise 80: Coin Flip Simulation
4 Function Exercises
Exercise 81: Compute the Hypotenuse
Exercise 82: Taxi Fare
Exercise 83: Shipping Calculator
Exercise 84: Median of Three Values
Exercise 85: Convert an Integer to its Ordinal Number
Exercise 86: The Twelve Days of Christmas
Exercise 87: Center a String in the Terminal
Exercise 88: Is it a Valid Triangle?
Exercise 89: Capitalize It
Exercise 90: Does a String Represent an Integer?
Exercise 91: Operator Precedence
Exercise 92: Is a Number Prime?
Exercise 93: Next Prime
Exercise 94: Random Password
Exercise 95: Random License Plate
Exercise 96: Check a Password
Exercise 97: Random Good Password
Exercise 98: Hexadecimal and Decimal Digits
Exercise 99: Arbitrary Base Conversions
Exercise 100: Days in a Month
Exercise 101: Reduce a Fraction to Lowest Terms
Exercise 102: Reduce Measures
Exercise 103: Magic Dates
5 List Exercises
Exercise 104: Sorted Order
Exercise 105: Reverse Order
Exercise 106: Remove Outliers
Exercise 107: Avoiding Duplicates
Exercise 108: Negatives, Zeros and Positives
Exercise 109: List of Proper Divisors
Exercise 110: Perfect Numbers
Exercise 111: Only the Words
Exercise 112: Below and Above Average
Exercise 113: Formatting a List
Exercise 114: Random Lottery Numbers
Exercise 115: Pig Latin
Exercise 116: Pig Latin Improved
Exercise 117: Line of Best Fit
Exercise 118: Shuffling a Deck of Cards
Exercise 119: Dealing Hands of Cards
Exercise 120: Is a List already in Sorted Order?
Exercise 121: Count the Elements
Exercise 122: Tokenizing a String
Exercise 123: Infix to Postfix
Exercise 124: Evaluate Postfix
Exercise 125: Does a List contain a Sublist?
Exercise 126: Generate All Sublists of a List
Exercise 127: The Sieve of Eratosthenes
6 Dictionary Exercises
6.1 Exercise 128: Reverse Lookup
6.2 Exercise 129: Two Dice Simulation
6.3 Exercise 130: Text Messaging
6.4 Exercise 131: Morse Code
6.5 Exercise 132: Postal Codes
6.6 Exercise 133: Write Out Numbers in English
6.7 Exercise 134: Unique Characters
6.8 Exercise 135: Anagrams
6.9 Exercise 136: Anagrams Again
6.10 Exercise 137: ScrabbleΒ’ Score
6.11 Exercise 138: Create a Bingo Card
6.12 Exercise 139: Checking for a Winning Card
6.13 Exercise 140: Play Bingo
7 File and Exception Exercises
Exercise 141: Display the Head of a File
Exercise 142: Display the Tail of a File
Exercise 143: Concatenate Multiple Files
Exercise 144: Number the Lines in a File
Exercise 145: Find the Longest Word in a File
Exercise 146: Letter Frequencies
Exercise 147: Words that Occur Most
Exercise 148: Sum a List of Numbers
Exercise 149: Both Letter Grades and Grade Points
Exercise 150: Remove Comments
Exercise 151: Two Word Random Password
Exercise 152: What's that Element Again?
Exercise 153: A Book with No e'' Βƒ Exercise 154: Names that Reached Number One Exercise 155: Gender Neutral Names Exercise 156: Most Births in a given Time Period Exercise 157: Distinct Names Exercise 158: Spell Checker Exercise 159: Repeated Words Exercise 160: Redacting Text in a File Exercise 161: Missing Comments Exercise 162: Consistent Line Lengths Exercise 163: Words with Six Vowels in Order 8 Recursion Exercises Exercise 164: Total the Values Exercise 165: Greatest Common Divisor Exercise 166: Recursive Decimal to Binary Exercise 167: Recursive Palindrome Exercise 168: Recursive Square Root Exercise 169: String Edit Distance Exercise 170: Possible Change Exercise 171: Spelling with Element Symbols Exercise 172: Element Sequences Exercise 173: Run-Length Decoding Exercise 174: Run-Length Encoding Part IISolutions 9 Introduction to Programming Solutions Solution to Exercise 1: Mailing Address Solution to Exercise 3: Area of a Room Solution to Exercise 4: Area of a Field Solution to Exercise 5: Bottle Deposits Solution to Exercise 6: Tax and Tip Solution to Exercise 7: Sum of the First n Positive Integers Solution to Exercise 10: Arithmetic Solution to Exercise 13: Making Change Solution to Exercise 14: Height Units Solution to Exercise 17: Heat Capacity Solution to Exercise 19: Free Fall Solution to Exercise 23: Area of a Regular Polygon Solution to Exercise 25: Units of Time (Again) Solution to Exercise 28: Wind Chill Solution to Exercise 32: Sort 3 Integers Solution to Exercise 33: Day Old Bread 10 If Statement Solutions Solution to Exercise 34: Even or Odd? Solution to Exercise 36: Vowel or Consonant Solution to Exercise 37: Name that Shape Solution to Exercise 38: Month Name to Number of Days Solution to Exercise 40: Name that Triangle Solution to Exercise 41: Note to Frequency Solution to Exercise 42: Frequency to Note Solution to Exercise 46: Season from Month and Day Solution to Exercise 48: Chinese Zodiac Solution to Exercise 51: Letter Grade to Grade Points Solution to Exercise 53: Assessing Employees Solution to Exercise 57: Is it a Leap Year? Solution to Exercise 59: Is a License Plate Valid? Solution to Exercise 60: Roulette Payouts 11 Loop Solutions Solution to Exercise 64: No more Pennies Solution to Exercise 65: Computer the Perimeter of a Polygon Solution to Exercise 67: Admission Price Solution to Exercise 68: Parity Bits Solution to Exercise 70: Caesar Cipher Solution to Exercise 72: Is a String a Palindrome? Solution to Exercise 74: Multiplication Table Solution to Exercise 75: Greatest Common Divisor Solution to Exercise 78: Decimal to Binary Solution to Exercise 79: Maximum Integer 12 Function Solutions Solution to Exercise 84: Median of Three Values Solution to Exercise 86: The Twelve days of Christmas Solution to Exercise 87: Center a String in the Terminal Solution to Exercise 89: Capitalize it Solution to Exercise 90: Does a String Represent an Integer? Solution to Exercise 92: Is a Number Prime? Solution to Exercise 94: Random Password Solution to Exercise 96: Check a Password Solution to Exercise 99: Arbitrary Base Conversions Solution to Exercise 101: Reduce a Fraction to Lowest Terms Solution to Exercise 102: Reduce Measures Solution to Exercise 103: Magic Dates 13 List Solutions Solution to Exercise 104: Sorted Order Solution to Exercise 106: Remove Outliers Solution to Exercise 107: Avoiding Duplicates Solution to Exercise 108: Negatives, Zeros and Positives Solution to Exercise 110: Perfect Numbers Solution to Exercise 113: Formatting a List Solution to Exercise 114: Random Lottery Numbers Solution to Exercise 118: Shuffling a Deck of Cards Solution to Exercise 121: Count the Elements Solution to Exercise 122: Tokenizing a String Solution to Exercise 126: Generate All Sublists of a List Solution to Exercise 127: The Sieve of Eratosthenes 14 Dictionary Solutions Solution to Exercise 128: Reverse Lookup Solution to Exercise 129: Two Dice Simulation Solution to Exercise 134: Unique Characters Solution to Exercise 135: Anagrams Solution to Exercise 137: ScrabbleTM Score Solution to Exercise 138: Create a Bingo Card 15 File and Exception Solutions Solution to Exercise 141: Display the Head of a File Solution to Exercise 142: Display the Tail of a File Solution to Exercise 143: Concatenate Multiple Files Solution to Exercise 148: Sum a List of Numbers Solution to Exercise 150: Remove Comments Solution to Exercise 151: Two Word Random Password Solution to Exercise 153: A Book with Noe'' Βƒ
Solution to Exercise 154: Names that Reached Number One
Solution to Exercise 158: Spell Checker
Solution to Exercise 160: Redacting Text in a File
Solution to Exercise 161: Missing Comments
16 Recursion Solutions
Solution to Exercise 164: Total the Values
Solution to Exercise 167: Recursive Palindrome
Solution to Exercise 169: String Edit Distance
Solution to Exercise 172: Element Sequences
Solution to Exercise 174: Run-Length Encoding
Index


πŸ“œ SIMILAR VOLUMES


Python workbook - a brief introduction w
✍ Stephenson, Ben πŸ“‚ Library πŸ“… 2015 πŸ› Springer International Publish 🌐 English

While other textbooks devote their pages to explaining introductory programming concepts,<i>The Python Workbook</i>focuses exclusively on exercises, following the philosophy that computer programming is a skill best learned through experience and practice.<br /><br />Designed to support and encourag

The Python Workbook: A Brief Introductio
✍ Ben Stephenson πŸ“‚ Library πŸ“… 2019-08 πŸ› Springer 🌐 English

This student-friendly textbook encourages the development of programming skills through active practice by focusing on exercises that support hands-on learning. The Python Workbook provides a compendium of 186 exercises, spanning a variety of academic disciplines and everyday situations. Solutions t

The Python Workbook: A Brief Introductio
✍ Ben Stephenson πŸ“‚ Library πŸ“… 2019 πŸ› Springer International Publishing 🌐 English

<p><p>This student-friendly textbook encourages the development of programming skills through active practice by focusing on exercises that support hands-on learning. <i>The Python Workbook</i> provides a compendium of 186 exercises, spanning a variety of academic disciplines and everyday situations

The Python Workbook: A Brief Introductio
✍ Ben Stephenson πŸ“‚ Library πŸ“… 2015 πŸ› Springer 🌐 English

While other textbooks devote their pages to explaining introductory programming concepts, The Python Workbook focuses exclusively on exercises, following the philosophy that computer programming is a skill best learned through experience and practice. Designed to support and encourage hands-on learn

The Python Workbook: A Brief Introductio
✍ Ben Stephenson (auth.) πŸ“‚ Library πŸ“… 2014 πŸ› Springer International Publishing 🌐 English

While other textbooks devote their pages to explaining introductory programming concepts, The Python Workbook focuses exclusively on exercises, following the philosophy that computer programming is a skill best learned through experience and practice. Designed to support and encourage hands-on learn

The Python Workbook: A Brief Introductio
✍ Ben Stephenson πŸ“‚ Library πŸ“… 2014 πŸ› Springer 🌐 English

While other textbooks devote their pages to explaining introductory programming concepts, <i>The Python Workbook</i> focuses exclusively on exercises, following the philosophy that computer programming is a skill best learned through experience and practice. Designed to support and encourage hands-o