Show-Me-the-Code / python

Show Me the Code Python version.
https://github.com/Show-Me-the-Code/show-me-the-code
MIT License
3.91k stars 2.74k forks source link

Create Python Program for Triangular Matchstick Number #351

Open Shubhamshukla369 opened 3 years ago

Shubhamshukla369 commented 3 years ago

Python Program for Triangular Matchstick Number,Given a number X which represents the floor of a matchstick pyramid, write a program to print the total number of matchstick required to form a pyramid of matchsticks of x floors.This is mainly an extension of triangular numbers. For a number X, the matchstick required will be three times of X-th triangular numbers, i.e., (3X(X+1))/2

Shubhamshukla369 commented 3 years ago

351