0% found this document useful (0 votes)
28 views

Python Practice Problems

The document contains instructions for 4 programming problems: 1) Print a triangular pattern of stars based on the input n. 2) Print a diamond pattern of stars based on the input n. 3) Print the first 100 numbers of the Fibonacci sequence. 4) Solve an additional problem.

Uploaded by

Saria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Python Practice Problems

The document contains instructions for 4 programming problems: 1) Print a triangular pattern of stars based on the input n. 2) Print a diamond pattern of stars based on the input n. 3) Print the first 100 numbers of the Fibonacci sequence. 4) Solve an additional problem.

Uploaded by

Saria
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Take an input n. Print the triangular pattern shown below 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.]

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.]

3. Print the first 100 fibonacci numbers.


To know more about fibonacci series:
https://www.mathsisfun.com/numbers/fibonacci-sequence.html
First 10 numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 …

4. Solve the following problem:

You might also like