CBSE Class 12 Computer Science
Question 22 of 42
Solved 2024 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 4
Back to all questions 4
Question Write a function countNow(PLACES) in Python, that takes the dictionary, PLACES as an argument and displays the names (in uppercase) of the places whose names are longer than 5 characters. For example, Consider the following dictionary:
PLACES = {1: "Delhi", 2: "London", 3: "Paris", 4: "New York", 5:"Doha"}
The output should be:
LONDON
NEW YORK