当前位置:天才代写 > Python代写,python代做代考-价格便宜,0时差服务 > Python Gui代写 Drawing Clouds and Trees circles | EECS 12

Python Gui代写 Drawing Clouds and Trees circles | EECS 12

2018-07-21 08:00 星期六 所属: Python代写,python代做代考-价格便宜,0时差服务 浏览:812

Python Gui代写 In this assignment, you are to complete a program to do the following tasks:

Python Gui代写 EECS 12 Assignment 4 (due 6pm, July 20)

Summer 2018

 

代写Python Gui 的案例In this assignment, you are to complete a program to do the following Python Gui代写 tasks:

 

1. A function to draw two clouds in front of the mountains has been given. draw_cloud (win, x1, x2, y1, y2) returns a list of circles which form a cloud at the given positions. You should use it to create clouds when the program starts.

a. It will draw a cloud on window win by drawing several circles at different positions.

b. Using a loop statement, it randomly produces a point (Point(x, y)) in each iteration as the center of the circle to draw a circle with radius of 2 and append that circle to a list.

c. x1, x2, y1, y2 are coordinates on the left side and right side of the sky.

d. The function will return a list of all circles

2. Implement a function to draw a tree on the green part of the window

draw_tree (p1, p2)

a. Ask user to click two points (p1 and p2) to draw the brown tree trunk.

b. Based on the tree trunk, draw a green circle as the tree body:

Python Gui代写
Python Gui代写

– The center point of the circle is defined by below:

– The radius of the circle is 1.2 times the tree trunk width.

– Draw the circle with a symmetric shape for tree.

3. Display the “Views”, “Wind”, “Exit” buttons. When the user clicks on

· the “View” button: the colors should change in sequence, the sky color to “deep sky blue”, the sun color to “dark orange”, and clouds color to “light gray”; after 1 second, the sky color should change to “navy”, clouds color

 

to “gray”, and sun should disappear; then after 1 second, the sky color and the sun color should change back to default colors.

· the “Winds” button, the two clouds should move horizontally to the right 10 times, just like the wind blows them to the right. Each time it moves x coordinate by 0.4. It sleeps for 0.1 second between moves.

· the “Exit” button, your program should close the window and stop.

Example:

1. Python Gui代写 Draw two clouds on the left and right sides of the sky.

Python Gui代写
Python Gui代写

 

2. Ask user for two points (p1 and p2) to draw the tree trunk, and based on the width of the tree trunk, draw the green tree body.

Python Gui代写
Python Gui代写

3. Display three buttons on the left side of the window, Views, Wind and Exit.

Python Gui代写
Python Gui代写

 

 

4. Clicking the Views button will make changes on the scene:

Morning scene:

image.png

Afternoon scene:

image.png

 

Evening scene:

image.png

 

5. Clicking the Wind button will blow the clouds to the right:

image.png

Grading Criteria

1. 15 points for correctly creating a graphics window and the buttons on it.

2. 25 points for correctly drawing the tree.

3. 25 points for correctly showing the views when “Views” clicked.

4. 25 points for correctly moving the clouds when “Wind” clicked.

5. 10 points for including comments in your program and correctly displaying user messages on the window during program execution.

Submission:

Submit your homework before 6pm, Python Gui代写 July 20 (Friday) to the Canvas. Submit only the Python source file with the name of “ID-hw4.py”.

代写CS&Finance|建模|代码|系统|报告|考试

编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 机器学习

金融类统计,计量,风险投资,金融工程,R语言,Python语言,Matlab,建立模型,数据分析,数据处理

服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导

天才写手,代写CS,代写finance,代写statistics,考试助攻

E-mail:850190831@qq.com   微信:BadGeniuscs  工作时间:无休息工作日-早上8点到凌晨3点


如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。

1513067809116994.png

最先出自天才代写 Python代写服务
合作:幽灵代写
 

天才代写-代写联系方式