def Change(X): for K, V in X.items(): L1.append(K) L2.append(V) D = {1: "ONE", 2: "TWO", 3: "THREE"} L1 = [] L2 = [] Change(D) print(L1) print(L2) print(D)
PASSENGERS.DAT
stores the records of passengers using the following structure:Create()
– to input data for passengers and write it in the binary file PASSENGERS.DAT
.SearchDestn(D)
– to read contents from the file PASSENGERS.DAT
and display the details of those Passengers whose DESTN matches with the value of D
.UpdateFare()
– to increase the fare of all passengers by 5% and rewrite the updated records into the file PASSENGERS.DAT
."P_record.csv"
contains the records of patients in a hospital. Each record of the file contains the following data:["Gunjan", "Jaundice", 4, 15000]
read_data()
which reads all the data from the file and displays the details of all the 'Cancer' patients.count_rec()
which counts and returns the number of records in the file.def ExamOn(mystr): newstr = "" count = 0 for i in mystr: if count % 2 != 0: newstr = newstr + str(count - 1) else: newstr = newstr + i.lower() count += 1 newstr = newstr + mystr[:2] print("The new string is:", newstr) ExamOn("GenX")
The given figure is reflected about the horizontal dashed line and then rotated clockwise by 90° about an axis perpendicular to the plane of the figure.
Which one of the following options correctly shows the resultant figure?
Note: The figures shown are representative
Fish : Shoal :: Lion : _________
Select the correct option to complete the analogy.
Identify the option that has the most appropriate sequence such that a coherent paragraph is formed:
Statement:
P. At once, without thinking much, people rushed towards the city in hordes with the sole aim of grabbing as much gold as they could.
Q. However, little did they realize about the impending hardships they would have to face on their way to the city: miles of mud, unfriendly forests, hungry beasts, and inimical local lords—all of which would reduce their chances of getting gold to almost zero.
R. All of them thought that easily they could lay their hands on gold and become wealthy overnight.
S. About a hundred years ago, the news that gold had been discovered in Kolar spread like wildfire and the whole State was in raptures.