Python
2. (10 pts) Write the definition of a function, sqr_10(t), which
uses turtle, t, to draw a square each side
of which is 10 long.
#IIf you have any queries then comment below.
import turtle
def sqr_10(t):
turtle.forward(t)
turtle.left(90)
turtle.forward(t)
turtle.left(90)
turtle.forward(t)
turtle.left(90)
turtle.forward(t)
turtle.left(90)
t=10
sqr_10(t)
Python 2. (10 pts) Write the definition of a function, sqr_10(t), which uses turtle, t, to...
Turtle Graphics with nested loop: Write a turtle graphics python program repeat_squares.py that uses nested loops to draw 100 squares, to create this design: Turtle-squares.png starting with the smallest square in the bottom right-hand corner. Start at position (-4,4). At each step increase the length of each side by 4 pixels. Draw 100 squares. Please submit with an animation speed of 0 and the turtle hidden turtle.hideturtle()
Python Code Question (10 pts) Write a boolean function, islnRect(t,xc,yc,W,H), which returns True if turtle, t, is inside or on the boundary of a rectangle of width, W, and height, H centered at xc,yc & which otherwise returns False. For this question and for the remainder of the test, assume that all rectangles have sides that are horizontal or vertical. 1. y axis (xc,yc) x axis x axis
Use a function in python that uses turtle graphics to draw a circle. Allow inputs of where to start (x,y) the radius, the pen color and fill color.
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)
Write a function that draw your initials. (Using python 3 turtle) (H, Z)
Python Question Task 4 Create a function named poker_table that uses Turtle Graphics to create a single poker table to accommodate all players. There should be four parameters: num_players indicates the number of players; side_length indicates the length in pixels of each side of the table; and x and y, which give the location where you should start drawing the table. The poker table should be a simple regular polygon (that is, with sides of equal length). The number of...
Write a function to draw three heights for a acute triangle via turtle. The input of the function are the coordinates of three vertexes. WRITE THE CODE IN PYTHON AND SHOW OUTPUT.
# Please use Python to do this question. # import turtle to do this question. Write a function, grade_histogram(t,mu,sigma,n), which uses the turtle module to make a histogram for quiz score data for n = 100 students. First, create the data using gauss(mu,sigma), from the random module. mu is the average and sigma is the standard deviation of the scores and is a measure of the spread of the data scores. When the quiz data is generated, check to make...
Answer must be in Python 3 Answer: import turtle def trifecta(size,angle,num): for i in range(num): tri(t,size) t.right(angle) t = turtle.Turtle() s = turtle.Screen() trifecta(100,25,5) Question 11 Part b (10 points) Write a function named trifecta() that takes three parameters: 1. size 2. angle 3. num trifecta() should call tri() repeatedly so as to draw num triangles, each with sides of length size. Each triangle should be oriented angle degrees clockwise from the preceding triangle. trifecta() should create a turtle and...
MUST BE IN PYTHON!!!! PLEASE HELP WITH NUMBER 10 & 11A & 11B!!! WIILL VOTE UP!!! F=False boolExprs = [T and F, T or F, T and T, F or F trueCount = 0 for expr in boolExprs: if expr: trueCount += 1 print (trueCount) a. 1 b. 2 c. 3 d. 4 e. None of the above Question 10 import tu1rtle s turtle.Screen () t turtle. Turtle () for i in range 4) if i%2 = 1: t.down )...