O'Reilly logo

Python Projects for Kids by Jessica Ingrassellino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

New functions – subtraction, multiplication, and division

Now that we have created an addition() function that accepts data from the user and converts it into numbers, we are ready to create functions for subtraction, multiplication, and division.

If you are coming back to this after a break, perform the following steps:

  1. Open your Python shell so that you can test your code as you write.
  2. Next, open your text editor (jEdit in Mac/Linux and Notepad ++ in Windows).
  3. Have both windows open on your desktop as you program.
  4. When you successfully write and test a line or a few lines of code in the Python shell, copy the lines into your text editor and then Save Your Work to the first_calc.py file that you created earlier in this chapter.

Tip

Save your work early ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required