diff --git a/Python/program-21/multitable.py b/Python/program-21/multitable.py new file mode 100644 index 00000000..2a76e724 --- /dev/null +++ b/Python/program-21/multitable.py @@ -0,0 +1,7 @@ +# Multiplication table in Python +# To take input from the user +num = int(input("Display multiplication table of? ")) + +# Iterate 10 times from i = 1 to 10 +for i in range(1, 11): + print(num, 'x', i, '=', num*i) \ No newline at end of file diff --git a/Python/program-21/readme.md b/Python/program-21/readme.md new file mode 100644 index 00000000..11ce4ae3 --- /dev/null +++ b/Python/program-21/readme.md @@ -0,0 +1,2 @@ +Python Program to Display the multiplication Table +This program displays the multiplication table of variable num. \ No newline at end of file diff --git a/Python/program-5/pattern.py b/Python/program-5/pattern.py deleted file mode 100644 index e067d825..00000000 --- a/Python/program-5/pattern.py +++ /dev/null @@ -1,10 +0,0 @@ -for i in range(1,6): - for j in range(1,6-i): - print(" ",end=" ") - for k in range(1,i+1): - print(k,end=" ") - if i>1: - for l in range(1,i+1): - print(l,end=" ") - print() - \ No newline at end of file diff --git a/Python/program-5/pattern1.py b/Python/program-5/pattern1.py deleted file mode 100644 index 2011dd0f..00000000 --- a/Python/program-5/pattern1.py +++ /dev/null @@ -1,11 +0,0 @@ -#pattern -for i in range(1,6): - for j in range(1,6-i): - print(" ",end=" ") - for k in range(1,i+1): - print(k,end=" ") - if i>1: - for l in range(1,i+1): - print(l,end=" ") - print() - \ No newline at end of file diff --git a/Python/program-6/pattern2.py b/Python/program-6/pattern2.py deleted file mode 100644 index 44eb7a2f..00000000 --- a/Python/program-6/pattern2.py +++ /dev/null @@ -1,4 +0,0 @@ -for i in range(1,6): - for j in range(1,i+1): - print(i,end=' ') - print() \ No newline at end of file diff --git a/Python/program-7/pattern3.py b/Python/program-7/pattern3.py deleted file mode 100644 index 601bfdbb..00000000 --- a/Python/program-7/pattern3.py +++ /dev/null @@ -1,8 +0,0 @@ -#pattern -for i in range(1,6): - for j in range (1,6-i): - print(" ",end=" ") - for k in range(1,i+1): - print(k,end=" ") - print() - \ No newline at end of file