we use the basic idle (or another python editorand type the followingx listing using variables in python here we define variable and sets the value equal to and then print the result to the screen [end of exampleyou can write one command by time in the idle if you quit idle the variables and data are lost thereforeif you want to write somewhat longer programyou are better off using text editor to prepare the input for the interpreter and running it with that file as input instead this is known as creating script python scripts or programs are save as text file with the extension py example calculations in python we can use variables in calculation like thisx print ( listing using and printing variables in python we can implementing the formula ax like thisa * print (ylisting calculations in python as seen in the examplesyou can use the print(command in order to show the values on the screen [end of example