2. Write a program that takes twenty mouse clicks from the user and draws a polygon whose corners, or vertices, are the clicked points.
3. Write a program that takes two mouse clicks from the user and draws rectangle whose corners include the two points clicked.
4. Write a program that asks the user for a list of prices of items purchased and prints out each price and the total, formatted nicely. Here is a sample run of the program:
Please enter the prices: 2.34, .99, 100, 81.05, 90
5. Make a list of at least 5 different places that you like to visit (these should be places that you would like to visit and not identical to others' lists or it will be picked up by the cheat-checking programs).
Your program should print out the list regularly and vertically. For example,
['San Francisco', 'Christchurch ', 'Sydney ', 'Bangkok ', 'Copenhagen ']
S C S B C
a h y a o
n r d n p
i n g e
F s e k n
r t y o h
a c k a
n h g
c u e
i r n
Hint: if you have a list of strings, places, then places[i] refers to the ith character of the first word in your list. Start by printing out the first place name vertically, then add in the others.
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.#!/usr/bin/python
from graphics import *
win = GraphWin("Draw a Pentagon")
win.setCoords(0.0, 0.0, 10.0, 10.0)
message = Text(Point(5, 0.5), "Click on five points")
# Get and draw three vertices of triangle...
By purchasing this solution you'll be able to access the following files: