# Please help me write a program to this problem? Inverted hollow pyramid

**URL:** <https://discuss.python.org/t/please-help-me-write-a-program-to-this-problem-inverted-hollow-pyramid/24363>\
**Category:** Python Help\
**Tags:** documentation, help, typing\
**Created:** [March 1, 2023, 5:48pm UTC](https://discuss.python.org/t/please-help-me-write-a-program-to-this-problem-inverted-hollow-pyramid/24363 "2023-03-01T17:48:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![E.Lokesh](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@E.Lokesh](https://discuss.python.org/u/E.Lokesh)\
**Post date:** [March 1, 2023, 5:48pm UTC](https://discuss.python.org/t/please-help-me-write-a-program-to-this-problem-inverted-hollow-pyramid/24363/1 "2023-03-01T17:48:08Z")

</div>

![16776926553446448833175957719758](https://us1.discourse-cdn.com/flex002/uploads/python1/original/2X/0/02c57e9bc30458019dedcf7f0e26248e27c6d4b6.jpeg)

---

<div class="post-metadata">

**Author:** ![MRAB](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@MRAB](https://discuss.python.org/u/MRAB)\
**Post date:** [March 1, 2023, 8:22pm UTC](https://discuss.python.org/t/please-help-me-write-a-program-to-this-problem-inverted-hollow-pyramid/24363/2 "2023-03-01T20:22:42Z")

</div>

What have you tried?

---

<div class="post-metadata">

**Author:** ![steven.daprano](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/steven.daprano/32/1083_2.png) [@steven.daprano](https://discuss.python.org/u/steven.daprano)\
**Post date:** [March 1, 2023, 9:02pm UTC](https://discuss.python.org/t/please-help-me-write-a-program-to-this-problem-inverted-hollow-pyramid/24363/3 "2023-03-01T21:02:39Z")

</div>

Please don’t post images of text.

> <https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors/285557#285557>

Don’t expect us to do your work for you. Make an attempt first. If you are not sure how to start, begin by writing down the steps **you** would use to do the task. For example, you might start by working out how many spaces are between the numbers:

- row 1 is special, and only prints a single 1;
- row 2 has 1 space between the numbers;
- row 3 has 3 spaces between the numbers;
- row 4 has 5 spaces between the numbers;
- can you see the pattern?

Once you reach row N, you might just copy the previous rows you have already seen.

If the problem is too hard, start with a simpler problem like “print a triangle”:

```
1
2 2
3 3
4 4
5 5
6 6

```

and solve that. Once you have that code working, modify it to make a pyramid. Once that code is working, modify it again to invert it.

Good luck!
