Professional Documents
Culture Documents
Week 6
Week 6
RUTHVIK
Reg No: 2200032675
Sec No: 24
Course: PFSD
Week-6
Experiment Title: Working with Dictionary and Functions
Description: It identifies the dictionary creation, modification methods and parameter passing
mechanism using python in functions.
Pre-Requisites:
Pre-Lab:
a) Python script to concatenate following dictionaries to create a new one. Sample Dictionary:
dic1={1:10, 2:20}
dic3= {5:50,6:60}
Output: -
In-Lab:
Program: -
Output: -
b) Python function that accepts a string and calculate the number of upper case letters
and lower case letters.
Sample String: 'The quick Brow Fox' Expected Output:
No. of Upper-case characters: 3 No. of Lower case Characters: 12
Program: -
Output: -
Post-Lab:
a) Program to remove an empty tuple(s) from a list of tuples. Sample data: [(), ('',), ('a', 'b'), ('a',
'b', 'c'), ('d')] Expected output: [('',), ('a', 'b'), ('a', 'b', 'c'), 'd'].
Program: -
Output:-