How to calculate stones in a step pyramid block?

How to calculate stones in a step pyramid block.
How can I make a calculator to calculate how many stones or blocks are in a pyramid.

step-pyramid-3d

In this image have total 14 block.

I want to just enter number of layer in a textbox and two side bottom layer’s blocks number in two different textbox
And calculator give result 14 Blocks.

How can I make this in kodular?
Please anybody help me giving idea or aia.
Thanks in advance.

How much will you pay for an aia?

I want help no paid service.

Okay. Hopefully someone will make you an aia for free.

that’s some simple math, isn’t it?
1 layer = 1 x 1 = 1
2 layer = 1 layer + 2 x 2 = 1 + 4 = 5
3 layer = 2 layer + 3 x 3 = 5 + 9 = 14
4 layer = 3 layer + 4 x 4 = 14 + 16 = 30
etc

Taifun

2 Likes

Yeah, But how can I edit block in kodular ?
I want to make something like that I just entered 3 value of a pyramid.
Where,
1 Value is Number layer of pyramid.
2 Value is Number of total Blocks of One Side Bottom layer.
3 Value is Number of Blocks of Another One Side Bottom layer.

And then give result total number of Blocks have in pyramid.

Is it possible .?
Thanks in advance.

This topic sounded like a student’s homework to me. :slight_smile: But I wanted to share it for the benefit of someone else, or a teacher in particular.

image

If you know the formula above:

Design page:
image

Block page:








Images were produced from a single block.

Phone screen shot.

1 Like

Yes exactly

I guess, the teacher is not very happy, that the students can now just copy your solution without learning anything themselves now…

Taifun

Thanks For Your Help But I am totally newbe in this platform I am a Textile Technician. I am trying to make a android app that make my work faster.

In this image have a yarn pyramid stock. I need to calculate all yarn package daily. Which need more time but I want to make calculator type app where I will enter 3 value in 3 textbox that’s I marked on this image and app give me the result how many yarn package have on this pyramid.
I really didn’t understand how can make this.

Please help me how can I make this.
Thanks in advance.

you alaready received an example how to do it… now try something yourself and adjust it to your needs… you first might want to learn the basics…

A very good way to learn App Inventor or Kodular is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun