You are on page 1of 1

NAME - Bhagyashree Sitaram Gejage.

BATCH NO - T1

ENROLLMENT NO - 2115770088

PRACTICAL NO-10
Q1) Write a Python function that accepts a string and calculate the number of upper case
letters and lower case letters.

CODE-
def up_low(str):
print("String is : ",str)
u=sum(1 for i in str if i.isupper())
l=sum(1 for i in str if i.islower())
print("No. of Upper case characters:",u)
print("No. of Lower case characters:",l)
up_low("Bhagyashree !!!! Welcome To Python Programming Language")

OUTPUT-

Q2) Write a python program to generate a random float where the value is between 5 and
50 using python math module.

CODE- OUTPUT-
import random
print("Random Float Number
Within a Range 5 and 50:")
r=random.uniform(5,50)
print(r)

You might also like