Question

Using Python, please write a program that draws the following shapes using turtles and tkinter: Tetrahedron...

Using Python, please write a program that draws the following shapes using turtles and tkinter:

Tetrahedron

Cube

Octahedron

Dodecahedron

Icosahedron

Please make sure they're drawn out using only lines in the 2D dimension. All the shapes need to be in the same window. No need to color them. Thank you.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

from tkinter import *
my_window = Tk()
my_canvas = Canvas(my_window,width=400,height=400,background='white')
my_canvas.grid(row=0,column=0)
my_canvas.create_line(100,200,170,50,300,230,150,250,100,200,300,230,150,250,170,50,width=5)
my_canvas2 = Canvas(my_window,width=400,height=400,background='white')
my_canvas2.grid(row=0,column=1)
my_canvas2.create_line(100,150,200,50,250,140,200,50,300,160,200,300,100,150,250,140,300,160,130,170,100,150,130,170,200,300,130,170,200,50,250,140,200,300,width=5)
my_canvas3 = Canvas(my_window,width=400,height=400,background='white')
my_canvas3.grid(row=1,column=0)
my_canvas3.create_line(100,100,120,200,170,150,150,50,100,100,200,120,250,70,150,50,250,70,270,170,220,220,120,200,220,220,200,120,250,70,270,170,170,150,width=5)
my_window.mainloop()

Add a comment
Know the answer?
Add Answer to:
Using Python, please write a program that draws the following shapes using turtles and tkinter: Tetrahedron...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PYTHON (Basic GUI Programming Using Tkinter): (Draw an arrow line) Write a program that randomly draws...

    PYTHON (Basic GUI Programming Using Tkinter): (Draw an arrow line) Write a program that randomly draws an arrow line when the Draw a Random Arrow Line button is clicked, as shown in Figure: ㊥ Random an Arrow Line Draw a Random Arrow Line

  • Python Consider the GUI below (3 Labels and 3 Radiobuttons) which has been produced with a Python program using the Tkinter library.   You are required to write a Python program to produce this inte...

    Python Consider the GUI below (3 Labels and 3 Radiobuttons) which has been produced with a Python program using the Tkinter library.   You are required to write a Python program to produce this interactive GUI. Your GUI must replicate the example above as closely as possible, including the same widgets displayed in the sample positions on the GUI, using the same colours, shapes and relative sizes. (Note that the GUI border in the sample output does not need to be...

  • Use Python 3 Create a program that uses Turtle to draw shapes. Show the following menu:...

    Use Python 3 Create a program that uses Turtle to draw shapes. Show the following menu: Enter Circle Enter Rectangle Remove Shape Draw Shapes Exit Circles – User inputs position, radius, and color. The position is the CENTER of the circle Rectangles – User inputs position, height, width, color. The position is the lower left-hand corner Colors – Allow red, yellow, blue, and green only Remove – Show the number of items in the list and let the user enter...

  • please solve the Program USING MATLAB. do not do #2. write in details for the command...

    please solve the Program USING MATLAB. do not do #2. write in details for the command lines. Make sure the program runs and also completely does what it askes please Write a Matlab program that displays on the screen checkerboard patterns comprising of two alternating_colors to be selected by the user. Your program MUST use as the checkerboard unit pattern a SQUARE INSCRIBED INSIDE A CIRCLE with unit pattern width and checkerboard dimension also to be inputted by the user....

  • Please help with this python turtle problem using the functions provided. Python Turtle Write a program...

    Please help with this python turtle problem using the functions provided. Python Turtle Write a program using the turtle module to draw the face of a clock that looks like the image below. You will need to use the turtle module for this exercise as well as the bgcolor), shape(), color), penup), right(), forward(), pendown(), and stamp() functions. The code below can be removed or changed as needed. import turtle t turtle.Turtle0 t.forward(75)

  • Hi, Can you help me with Python using Tkinter? Please read all requirements and could you...

    Hi, Can you help me with Python using Tkinter? Please read all requirements and could you pls do it as simple as possible! Aa- AaBbC AaBbCel AalBbCel AaßbCcD AaBbC AaBbCel AaBbCcl AaBbCcl Pind - Replace b Select IU-b x, x A A- Heading 1 1 Heading 3 1 Normal Subtde Tle 1 No Spac Subtle Em Emphasis Fon Paragraph Styles Editng Perform the Following Tasks Use Tkinter Graphics Design a simple graphical program Task 1: as indicated below: nts put...

  • USING PYTHON *Write a program, in which the user enters two numbers, then divides the first...

    USING PYTHON *Write a program, in which the user enters two numbers, then divides the first number by the second, and prints the result to two decimal places. *Make sure that that the inputs are floats (with exception handling using the ValueError). *Make sure that there is no divide by zero error (with exception handling). *Then have a plain exception: That handles any other error. -Thank you in advance for your assistance-

  • USING PYTHON PLEASE Write a program that calculates the factorial value of a number entered by...

    USING PYTHON PLEASE Write a program that calculates the factorial value of a number entered by the user. Remember that x! =x* (x-1)* (x-2)*... *3+ 2* 1. Your program should check the value input by the user to ensure it is valid (i.e., that it is a number > =1). To do this, consider looking at the is digit() function available in Python. If the user enters an incorrect input, your program should continue to ask them to enter a...

  • Please write comments with the program. Python programming!! Part III - write student data In this...

    Please write comments with the program. Python programming!! Part III - write student data In this part the program should create a .csv file and fill it with generated student information. The program should: Ask the user for a name for the .csv file (use your own name for the exercise) Create the .csv file with columns named - ID, first-name, GPA Based on the information received in part I, generate and fill students information in the CSV file Tell...

  • PLEASE DO THIS IN PYTHON!!!!!!!! 1.) For each lab program you develop, make sure to include...

    PLEASE DO THIS IN PYTHON!!!!!!!! 1.) For each lab program you develop, make sure to include the following header - replace the dots with your section #, semester, your full name, your instructor’s name, and lab #:                         Class: CSE 1321L Section:       ...          Term:          ... Instructor:    ... Name:          ...    Lab#:          ... Make sure to put the correct comment character(s) before the above lines in each file. C# & Java use // for comments, Python uses a # Exercise #1:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT