Category: 10 Lines

Control your computer using Python

Python is an excellent language for taking control of your computer and performing some of the more tedious tasks. I recently used it to automate how I create Python training videos and have just...

A simple GUI (graphical user interface)

Python is an easy-to-learn yet powerful language, and comes with a wealth of libraries. It is often used to create simple scripts. You run these on the command line, giving it any parameters it...

Take out your turtle for a recursive walk

Python is a simple but powerful language, and comes with a wealth of libraries. It took just 10 lines of code and the Turtle library to create the black line in the image above....

Use Python to update a spreadsheet

How would you like to grab a share price daily and store it in a spreadsheet? Or add a new column to dozens of spreadsheets – automatically? Python is a simple but powerful language,...

1/2 + 1/3 = 1/6

Fractions in Python

When you ask your spreadsheet to calculate 1/2 + 1/3 you get something like this: This is obviously an approximation. The 3’s after the decimal point repeat indefinitely. The correct answer is: 1/2 =...