Toggle Navigation
Everything
Blog posts
Pages
Home
About
The Author
The Book
This Website
Book
Chapter 1: Introduction
Chapter 2: The Core Python Language I
Examples
Questions
Problems
Additional Problems
Chapter 3: Simple Plotting with pylab
Examples
Problems
Chapter 4: The core Python language II
Examples
Questions
Problems
Additional Problems
Chapter 5: IPython and IPython Notebook
Examples
Chapter 6: NumPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 7: Matplotlib
Examples
Questions
Problems
Chapter 8: SciPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 9: General Scientific Programming
Examples
Questions
Problems
Errata
Book (2nd ed.)
Chapter 1: Introduction
Chapter 2: The Core Python Language I
Examples
Questions
Problems
Additional Problems
Chapter 3: Simple Plots and Charts
Examples
Problems
Chapter 4: The core Python language II
Examples
Questions
Problems
Additional Problems
Chapter 5: IPython and Jupyter Notebook
Examples
Problems
Chapter 6: NumPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 7: Matplotlib
Examples
Questions
Problems
Chapter 8: SciPy
Examples
Questions
Problems
Additional Examples
Additional Problems
Chapter 9: Data Analysis with pandas
Examples
Problems
Chapter 10: General Scientific Programming
Examples
Questions
Problems
Errata
Additional Notes
Blog
Apps
Contact
Home
Book
Chapter 2: The Core Python Language I
Questions
Questions
Q2.2.4 Complex numbers: $i^i$
Q2.2.7 Deducing the top-face value of a die
Q2.2.8 Paper folding
Q2.2.10 Exponentiation gotcha
Q2.3.1 String slicing
Q2.3.2 Determine if a string is a palindrome
Q2.3.5 String comparison gotcha
Q2.4.2 Using a list to represent a polynomial
Q2.4.3 Ranking a list
Q2.4.4 The Madhava series
Q2.4.5 any(x) and not all(x)
Q2.4.6 zip and its inverse
Q2.4.7 Sorting one list based on items in another
Q2.5.1 Normalizing a list
Q2.5.2 The arithmetic-geometric mean
Q2.5.3 Fizzbuzz
Q2.5.4 Alkane chemical formulae
Q2.7.2 Compound interest function
Q2.7.3 Harshad numbers