Python Practice Problems
Python Practice Problems
(Output
samples are shown below)
n = 1 n = 2 n = 3 n = 4 n = 5
* * * * *
** ** ** **
* *** *** ***
** **** ****
* *** *****
** ****
* ***
**
*
[Observe and compare the values of n with corresponding outputs to understand the
pattern.]
2. Take an input n. Print a diamond pattern using the value of n. (Output samples are
shown below)
n = 1 n = 2 n = 3 n = 4 n = 5
* * * * *
* * * * * * * *
* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
[Observe and compare the values of n with corresponding outputs to understand the
pattern.]