Practicals of Python | AbdurRahman G

Practicals of Python

(AbdurRahman G)




Presented Here




LIST OF PRACTICALS



·                     lower

·                     count

·                     replace


            (a)     Create a string containing at least five words and store it in a variable.

            (b)     Print out the string.

            (c)     Convert the string to a list of words using the string split method.

 (d)     Sort the list into reverse alphabetical order using some of the list methods (you might need to use dir(list) or help(list) to find appropriate methods).

            (e)     Print out the sorted reversed list of words.




What is your favorite number? 24

            24 is not prime

            What is your favorite number? 31

            31 is prime










Post a Comment

0 Comments