Day34-Dictionary MethodsDictionary Methods Dictionary uses several built-in methods for manipulation. They are listed below: i. update() The update() method updates the value of the key provided to it if the item already exiJun 14, 2026·3 min read
Day 29-DocstringsDocstrings in python Python docstrings are the string literals that appear right after the definition of a function, method, class, or module. Example def square(n): '''Takes in a number n, returnJun 14, 2026·4 min read
Day-28 f-stringsString formatting in python String formatting can be done in python using the format method. txt = "For only {price:.2f} dollars!" print(txt.format(price = 49)) f-strings in python It is a new stringJun 14, 2026·3 min read
Day-27 Exercise-GameCreate a program capable of displaying questions to the user like KBC. Use List data type to store the questions and their correct answers. Display the final amount the person is taking home after plaJun 14, 2026·2 min read
Day-26-Exercise GreetingsExercise 2: Good Morning Sir Create a python program capable of greeting you with Good Morning, Good Afternoon and Good Evening. Your program should use time module to get the current hour. Here is a Jun 14, 2026·1 min read
Day25-Operations on TuplesManipulating Tuples Tuples are immutable, hence if you want to add, remove or change tuple items, then first you must convert the tuple to a list. Then perform operation on that list and convert it baJun 14, 2026·2 min read
Day24-Introduction to TuplesPython Tuples Tuples are ordered collection of data items. They store multiple items in a single variable. Tuple items are separated by commas and enclosed within round brackets (). Tuples are unchangJun 11, 2026·4 min read