Installing python To install python go to python.com and click Downloads: And then it will show this: If your computer is windows 10 click on yellow button Download python 3.9.7 (If your computer is mac click on yellow button macOS
Opening python If you have windows click start, programs, python, lide If you have mac click spotlight (top right of the screen) type idle, press “enter”. Click File then new window
Then type this code: This Photo by Unknown Author is licensed under CC BY-SA The simple program it opens and show you hello
Python Variables Variables is stored of the text Of the Variable we say. and here is the code: program Name=go Print(name) Output go or type this program type=67 print(type) output 67
The python graphics Today we will learn the computer will draw a shape on it And try this From turtle import For n in range(0,6): Forward(200) Right(60) From turtle import * from turtle import * For n in range(0,6) for n in range(0,5) Forward(100) forward(200) Right(45) right(144) From turtle import *
For n in range(0,6) Forward(200) Right(72)
Search
Read the Text Version
- 1 - 6
Pages: