I was reading Tim Bray's recent blog posts (here and here) about his Topfew utility with interest, and wondered how my go-to systems programming language (Nim) stacks up compared to Go. I knocked up a quick and dirty implementation and then ran against a 900MB access_log from my own site...
Continue reading...
Problems with restarting the game
Serhii writes (excerpted from two emails):
I teach programming lessons for the pupils. We try to do restart button for the “Bounce” as it follows: jasonrbriggs.com/journal/2014/09/03/restarting-the-game.html ...there is a problem in “command=restart”.
If I run your code I get the followi...
Continue reading...String Formatting
Lou O writes:
Continue reading...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...
PfK and iPython
Jobakhan writes (edited):
Continue reading...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...
Trouble with turtles
Theodore M writes:
Continue reading...*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...
Becoming an expert
Femi A writes:
Continue reading...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 ...
Multiplying Strings
Robin L writes (excerpted):
Continue reading...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...
Stickman refusing to move
Haran R writes:
Continue reading...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...
That's Pants
Lee writes:
Continue reading...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...
askcolor
Isai writes:
Continue reading...*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...