Professional Documents
Culture Documents
Mimpython 1
Mimpython 1
Mimpython 1
Introduction:
Python, recognized as a high-level programming language, has become widely popular for its
readability, simplicity and extensive libraries. This introductory overview will delve into
essential concepts that establish the groundwork of Python programming.
Problems:
Implement Code:
Strong number in Python:
A strong number is a special number whose sum of the all digit factorial should be equal to the
number itself.
To find a whether given number is strong or weak. We pick each from the given number and find
its factorial and we will do this every digit of the number.
Once we get the factorial of all digit, then we do the sum factorials. If the sum is equal to the
given number then the given number is strong otherwise not.
Cheak a number is Strong or Week:
Implement Code:
Palindrome in Python:
For a number or string to be palindrome in Python, the number or string must be the same when
inverted. If the string or number does not remain unaltered when reversed, it is not a Palindrome.
For instance, 11, 252, 1221 and 25952 are palindrome numbers in Python.
MOM, MADAM and RADAR are palindrome strings in Python.
Example: MIM
Output: Yes, a palindrome string.
Example: 1234321
Output: Yes, a palindrome number.
Therefore, a palindrome in Python is any word, number, sentence or string that reads the same
backward or forward.
Cheak if a number String is Palindrome or not:
Implement Code:
Matrix Multiplication:
Matrix multiplication is an operator that takes two matrices as input and produces single matrix
by multiplication rows of the first matrix to the column of the second matrix. In matrix
multiplication make sure that the number of columns of the first matrix be equal to the number of
rows of the second matrix.
Matrix Multiplication:
Implement Code:
Conclusion:
During this lab session, I explored the core principles of Python programming. I initiated by
grasping the fundamentals, including data types, variables, and elementary operations.
Subsequently, I delved into control flow mechanisms such as conditionals and loops, which aid
in decision-making and task repetition.
Moreover, I gained insight into functions, which facilitate the organization of code into reusable
components. These concepts form the bedrock of Python programming, empowering me to
develop efficient and well-structured code.