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)
import turtle def tri(t, size): def trifecta(size,angle,num): t = turtle.Turtle() |
Answer must be in Python 3 Answer: import turtle def trifecta(size,angle,num): for i in range(num): tri(t,size)...
Using python Here is the code import turtle def draw_triangle(vertex, length, k): ''' Draw a triangle at depth k given the bottom vertex. vertex: a tuple (x,y) that gives the coordinates of the bottom vertex. When k=0, vertex is the left bottom vertex for the outside triangle. length: the length of the original outside triangle (the biggest one). k: the depth of the input triangle. As k increases by 1, the triangles shrink to a smaller size. When k=0, the...
I need help with this code, I have it started here import sys import turtle menu = "Press 1 for Flower" UserChoice = input(menu) #function to draw squares def draw_square(square): for i in range(0,2): square.forward(100) square.right(70) square.forward(100) square.right(110) #function to draw flower def draw_flower(petalNumber): window = turtle.Screen() window.bgcolor("yellow") pen = turtle.Turtle() pen.shape("triangle") pen.color("red") for number in range(0,petalNumber): draw_square(pen) pen.right(360/petalNumber) for i in range(0,4): pen.circle(20) pen.right(90) pen.right(90) pen.forward(300) pen.right(90) draw_square(pen) pen.left(180) draw_square(pen) pen.left(270) pen.forward(200) window.exitonclick() #function for original art...
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 )...
dle Edit Search View Encoding Language Settings Tools Macro Run Plugins Window 1 isport turtle 3 tina turtle.Turtle 4 SCreen-turtle.Screen ) 5 acreen.bgoolor ("white") 6 tina.shape ("turtle" 7tina.pencolor ("blue") SCALE -20 10 12 13 14 15 16 17 18 19 20 21 input: n # output: a drawing of n concentric circles centered at 0,0 # this function is written using iteration (using a loop) Edef concentric loop (n) : for size in range(n) : tina.penup tina goto (O, -SCALE...
In Python, starting with the 8x8 board solution that will be appended here add the following functionality: 1) Add code to create a list, containing 8 lists, with each of the 8 lists containing 8 null strings as values. Call the list of lists board. code provided by prof: import turtle validMovesList=['A0','A2','A4','A6','B1','B3','B5','B7', 'C0','C2','C4','C6','D1','D3','D5','D7', 'E0','E2','E4','E6','F1','F3','F5','F7', 'G0','G2','G4','G6','H1','H3','H5','H7','quit'] def drawSquare(t,length,color): t.fillcolor(color) t.begin_fill() for num in range(4): t.forward(length) t.left(90) t.end_fill() def drawRow(t,length,color1,color2): for i in range(4): drawSquare(t,length,color1) t.forward(length) drawSquare(t,length,color2) t.forward(length) def drawCircleFilled(t,size,color): t.fillcolor(color) t.begin_fill()...