0% found this document useful (0 votes)
29 views1 page

Answers Should Be Submitted in The Below Link

The document lists 11 Python programming exercises including finding the transpose, multiplication, addition and subtraction of matrices; using list comprehension for matrix operations; finding numbers divisible by 6 and multiples of 3; defining a basic calculator; printing various patterns; checking if a number is perfect; finding Pythagorean triples; checking divisibility by 11 without a modulo operator; printing an arithmetic progression series; and computing binomial coefficients.

Uploaded by

Abinaya P
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)
29 views1 page

Answers Should Be Submitted in The Below Link

The document lists 11 Python programming exercises including finding the transpose, multiplication, addition and subtraction of matrices; using list comprehension for matrix operations; finding numbers divisible by 6 and multiples of 3; defining a basic calculator; printing various patterns; checking if a number is perfect; finding Pythagorean triples; checking divisibility by 11 without a modulo operator; printing an arithmetic progression series; and computing binomial coefficients.

Uploaded by

Abinaya P
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/ 1

1.

Write a Python program to do the following


a. find transpose of the matrix
b. find matrix multiplication
c. find matrix addition and subtraction
d. find norm of a matrix
2. Write a Python program to do the following using list comprehension.
a. find transpose of the matrix
b. find matrix multiplication
c. find matrix addition and subtraction
d. find norm of a matrix
3. Write a Python program to find those numbers which are divisible by 6 and multiple
of 3, between 150 and 300 (both included)
4. Write a Python program to define a calculator and perform basic operations of a
calculator.
5. Write a Python program to print the following pattern
1
23
456
7 8 9 10
11 12 13 14 15
6. Write a python program to check whether a given number is perfect or not.
7. A right triangle can have sides that are all integers. The set of three integer values for
the sides of a right triangle is called a Pythagorean triple. These three sides must
satisfy the relationship that the sum of the squares of two of the sides is equal to the
square of the hypotenuse. Find all Pythagorean triples for side1, side2, and the
hypotenuse all no larger than 500.Use a triple-nested for loop that simply tries all
possibilities.(hypotenuse2=side12+side22)
8. Write a python program which determines whether a number is divisible by 11 or not,
without using the mod operator. [Hint:
Step 1: Starting from the one’s digit add alternate digits as sum1
Step 2: Add the remaining digits together as sum2
Step 3: Find difference between sum1 and sum2
If the difference is 0 then the number is divisible by 11.
e.g. 2651 (2+5)-(6+1) = 0; hence 2651 is divisible by 11]
9. Write a python program which prints the Arithmetic progression series, given the first
term and the difference. [Note: an AP series is a sequence of numbers such that the
difference between the consecutive terms is constant. i.e. a, a+d, a+2d … a+nd. Your
program should read the values for ‘a’, ‘d’ and ‘n’ and should generate the series.]
10. Write a python program to draw the following pattern.
*
* * *
* * * * *
* * * * * * *
* * * * *
* * *
*

11. Write a python program to compute nCr, where n & c are natural numbers.

Answers should be submitted in the below link

https://forms.gle/XDh1KHiY7CfZHV4i7

You might also like