Question: 1 . Write a Python function that accepts a string and calculates the number of upper case letters and lower case letters. Input string might

1.
Write a Python function that accepts a string and calculates the number of upper case letters and lower case letters. Input string might contain special characters (say @,\#). You need to ignore them while performing the calculation.
2.
Write a Python function that checks whether a number is in a given range (inclusive of high and low)
3.
Read a string and a pattern and return True if the pattern exists in the string otherwise False.
4.
Write a Python program to find the factorial of a number.
5.
Implement a simple calculator : Read two numbers and the operation (addition/ subtraction/multiplication/division/reminder/floor division),
Output the corresponding result. [Hint: use if/elif/else]
6.
Write a Python program to calculate the area of a triangle :
\[
\begin{array}{l}
s=(a+b+c)/2\\
a r e a=\sqrt{\left(s(s-a)^{*}(s-b)^{*}(s-c)\right)}
\end{array}
\]
7.
You are given three sides of a triangle: \( a, b \) and \( c \). Return True if they constitute a rightangled triangle.
8. Write a python program which returns the reverse of a number. Don't use string operations.
Sample Input : 1234
Sample Output : 4321
1 . Write a Python function that accepts a string

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!