Teach Your Kids To Code: A Parent-friendly Guide to Python Programming

(vip2019) #1

3


numbers and Variables: Python Does the Math


We’ve used Python to do really fun things, like make


colorful pictures in just a few lines of code, but our


programs have been limited. We just ran them and


watched them make pictures. What if we wanted to


interact with our Python programs? In this chapter,


we’ll learn how to have Python ask the user’s name


and even offer to do the user’s math homework!

Free download pdf