Pycharm development environment settings and familiarity.
Practice basic input and output:
Print (' Hello, {}. '. Format (name))
Uprint (SYS.ARGV)
How to use the library:
Import ...
From ... import ...
Conditional statements:
if (ABS (POS))) <1:
Break
Loop statement:
For I in range (5):
While True:
function definition:
def mygoto (x, y):
def DRAWJX (R):
Comprehensive exercise: Draw one side of the flag, put the code with the run Publish blog to hand in the homework.
#-*-coding:utf-8-*- fromTurtleImport*defMygoto (x, y): Up () goto (x, y) down ()defDraw (Z): Begin_fill () forIinchRange (5): Forward (z) right (144) End_fill () Setup (700,500, 0,0) color ("Yellow") bgcolor ("Red") FillColor ("Yellow") Hideturtle () Mygoto (-250,75) Draw (100) Mygoto (-130,150) Draw (30) Mygoto (-80,100) Draw (30) Mygoto (-80,40) Draw (30) Mygoto (-130,-10) Draw (30) Done ()
Python basic painting flag