Example HTML page

Python Exercise 13

Hi,

Please do the following programs.

Model 1:

1.Write a Python script to print a number pattern by using for loop and a range function. Your output should be as follows.

1 
2 2 
3 3 3 
4 4 4 4 
5 5 5 5 5 

2. Write a Python script to print a number pattern by using for loop and a range function. Your output should be as follows.

1 
1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 

3. Write a Python script to print a number pattern by using for loop and a range function. Your output should be as follows.

1 
2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 

4.Write a Python script to print Alphabet pattern and your output should be like the following.

A 
B C 
D E F 
G H I J 
K L M N O 

5.Write a Python script to print alphabets pattern and your output should be like:

A 
A B 
A B C 
A B C D 
A B C D E

6.Write a Python script to print first, third and fifth rows of right angle triangle pattern and the output should be as shown in below:

* 
* * * 
* * * * * 

7.Write a Python program to print total rows of right angle triangle and your output should be as follows.

* 
* * 
* * * 
* * * * 
* * * * *

8.Write a Python program to print String pattern and the output should print as shown in below.(Here you can give your name or some other as input).

s 
u u 
d d d 
h h h h 
a a a a a 

Model 2:

9.Write a Python program to print the pattern of Reverse right angle triangle using “*”. The output should print as follows:

* * * * * 
* * * * 
* * * 
* * 
*

10.Write a Python program to print the pattern of Reverse right angle triangle using numbers. The output should be as shown in below:

1  2  3  4  5  
1  2  3  4  
1  2  3  
1  2  
1

Model 3:

11.Write a Python program to Print full Triangle pyramid using “*”. It should print as follows.

        *  
       * *  
      * * *  
     * * * *  
    * * * * *  

12.Write a Python program to print asterisk(*)full pyramid pattern by using functions. The output should be as follows.

    *
   ***
  *****
 *******
*********

Model 4:

13.Write a Python program to print asterisk(*)reverse full pyramid pattern by using functions. The output should print like:

*********
 *******
  *****
   ***
    *

Model 5:

14.Write a Python program to print square pattern using “$”. Your output should be like:

$  $  $  $  
$  $  $  $  
$  $  $  $  
$  $  $  $ 

Model 6:

15.Write a Python script to print the pattern of F letter.The output should be as shown in below:

FFFFFF
F     
FFFFFF
F     
F 

16.Write a Python scripts to print the patterns of letters A,B,C,E,I,H,L,M,N,O,P,X,T, U.

17. Write a Python script to print the pattern of 6 number. The output should be as shown in below:

$$$$$
$    
$    
$$$$$
$   $
$   $
$$$$$

18.Write a Python scripts to print the patterns of numbers 5,8,7,9,11.

Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest