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

Python Programming Exercises and Functions

The document contains Python programming notes that outline the use of the type() and instance() functions for class identification and object checking. It includes several programming exercises (WAP) such as finding the largest of three numbers, converting character cases, determining leap years, and counting vowels and consonants in a string. Additional tasks involve string manipulation, including reversing strings, removing duplicates, and counting letter occurrences.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python Programming Exercises and Functions

The document contains Python programming notes that outline the use of the type() and instance() functions for class identification and object checking. It includes several programming exercises (WAP) such as finding the largest of three numbers, converting character cases, determining leap years, and counting vowels and consonants in a string. Additional tasks involve string manipulation, including reversing strings, removing duplicates, and counting letter occurrences.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python Notes

 type() function to know which class a variable or a value belongs to.


 instance() function is used to check if an object belongs to a particular
class.

#WAP to find largest of three numbers

#WAP to enter any character If he entered charcter in lower case then convert
it into upper case and vice versa.

#WAP to find whether given year is a leap year or not.

#WAP to find whether a given character is a vowel or a consonant.

#WAP to enter a string and count number of vowels and consonants.

#WAP to enter marks of a student in 4 subjects. Calculate the total and


aggregate and display the grade of the student.

[Link] to reverse the string


[Link] to remove duplicates from the given string
[Link] to count number of letters inn each word.
[Link] calculate the occurrence of each letter in a string
[Link] to search a specific word in a string

You might also like