1 posts
Posted 05 December 2016 - 10:53 PM
Title says it. Need help making a pyramid and havent done any lua/java before. If anyone has a code written for it, it would be appreciated!
3057 posts
Location
United States of America
Posted 06 December 2016 - 01:53 AM
As with any problem in programming, you should start by breaking this into smaller steps (pun intended)
What is a pyramid but many layers of squares?
What are squares but multiple lines?
What are lines but multiple points?
How would you make a line?
10blockline
for i = 1, 10 do
turtle.place()
turtle.back()
end
Now that you can build a line, you need to figure out how to build a square. I'll let you figure that out yourself.
PS: This appears to be some sort of homework problem, so I'm going a bit light on the code part and focusing more on explanation