top of page
91643289
About: About
PYTHON EXERCISE
In the 121COM class, I will always do some picture drawings in Python, which make the program more attractive. By practice more and more these kinds of exercise, I am now always able to draw pictures in Python
​
Below is some of the example.
​
About: Text
THE PROGRAM
from tkinter import Tk, Canvas frame=Tk() canvas=Canvas(bg='black',height=250,width=300) coord=(100, 100, 200, 200) canvas.create_arc(coord,start=0,extent=90,fill='white') canvas.create_arc(coord,start=90,extent=90,fill='blue') canvas.create_arc(coord,start=180,extent=90,fill='white') canvas.create_arc(coord,start=270,extent=90,fill='blue') canvas.pack() frame.mainloop()
About: Text
RESULT
About: Image
As doing more and more practice like the above exercise, I will know more methods and skills to draw pictures in Python. For example, after a number of practice, I remember that I have to always import tkinter to draw pictures. By now on, I can feel easy to draw a picture in Python in anytime.
​
Every time I have idea in my mind, I will start to design the program for drawing the picture. After designing, I will run and test the program, to see whether the result of the program (a picture) looks like the picture in my mind, so as to decide if the exercise success of fail. By this way, I can always make good use of Python drawing.
About: Quote
bottom of page