GR 10 AI Practical
GR 10 AI Practical
print("Digit")
elif ch.isupper():
print("Uppercase")
elif ch.islower():
print("lowercase")
else:
print("special character")
write a program to take 4 digit number from user and check first and last
digit is equal or not. If it is equal then calculate sum of both digits otherwise
product of both digits.
fd = n//1000
ld = n%10
if fd == ld:
else:
print("First and last digit is not equal, their product is = ", fd*ld)
Accept a four digit number from user and calculate the sum of all the digits
of the number
sum = 0
for i in num:
print(sum)
write a program to accept student name and 4 subjects marks and display
the student name with highest marks.
temp=math
if temp<=phy:
temp=phy
elif temp<=chem:
temp=chem
elif temp<=bio:
temp=bio
charges=0
extracharges=0
extraunits=0
gst=0
tot=0
if units<100:
tot=0
charges=units*5
gst=charges*(3/100)
tot=charges+gst
else:
extraunits=units-200
charges=200*5
extracharges=extraunits*10
gst=(charges+extrachaarges)*3/100
tot= charges+extracharges+gst