String Formatting

Lou O writes:

Hi Jason, Read a few good reviews of your book on Amazon. One of the reviews pointed out “The explanation of String formatting needs to be updated. We don’t do embedded values using %s anymore. I recommend skipping the chapters on Turtle Graphics and tkinter. The introductory...

Continue reading...

PfK and iPython

Jobakhan writes (edited):

Using this code import sys
def moon_weight():     print(’Please enter your current Earth weight’)
    weight = float(sys.stdin.readline())
    print(’Please enter the amount your weight might increase each year’)
    increase = float(sys.stdin.readline())
    print...

Continue reading...
Trouble with turtles

Trouble with turtles

Theodore M writes:

*Hello. Working in python with my daughter, but stuck on this error:

Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type “copyright”, “credits” or “license()” for more information. >>> import turtle Trace...

Continue reading...

Becoming an expert

Femi A writes:

I just got your book: Python for kids and I’m excited to start reading it. I am 36 years old and I would like to learn computer programming. I figure python would be a good place to start. Is it possible to become an expert at python in 6 months with intensive efforts? And if ...

Continue reading...

Multiplying Strings

Robin L writes (excerpted):

I am trying to teach myself how to code and thought this was a good place to begin. I am having trouble with the “multiplying strings” section. I don’t know anyone else who codes so I am hoping that you are still available at this email. This is the *part about pri...

Continue reading...
Stickman refusing to move

Stickman refusing to move

Haran R writes:

I tried out the code for the two games and have successfully run the first game (bounce). The second game however did not run like how i wished it to. I followed the book’s instructions to the letter, used the GIMP software to create the images, saved it in a directory and sa...

Continue reading...

That's Pants

Lee writes:

I’m not fully understanding the HugeHairyPants program on pages 72-73 of Python For Kids. I initially thought that the loop would produce “huge huge hairy hairy pants pants,” reasoning that the program would assign the first value to i, then the identical value to j, and continue...

Continue reading...
askcolor

askcolor

Isai writes:

*I am having trouble with this code in page 176:

from tkinter import *
colorchooser.askcolor()

When I load it into IDLE, I get a blank canvas, and I can’t close it, I have to restart the shell.

I have installed the proper ActiveTcl version (8.5), and no longer get the message...

Continue reading...