Skip to content
Advertisement

Tag: for-loop

Number Pyramid Nested for Loop

I’m wondering if you could help me out. I’m trying to write a nested for loop in Python 3 that displays a number pyramid that looks like; Can anybody help me out? It would be much appreciated! This is what I have so far: So, I can only get half of the pyramid to display. I guess the main problems

python turtle loop

I am trying to create a looping square, and cannot figure out how to get my code to allow me to keep repeating the command of creating squares, times the number input, heres what I have currently. Answer You can use for i in range(count_int): to run a piece of code repeatedly given a repeat count in count_int:

Advertisement