please answer it guyse
Attachments:
Answers
Answered by
9
Q17.
(i) To add one more record [name & percentage of a student]
- students[<student_name>] = <percentage>
(ii) To print the names of all the students.
- print(student.keys())
(iii) To change the percentage of a student named 'Vijay' to 90%.
- students['Vijay'] = 90
(iv) To print the maximum marks.
- print(max(students.values()))
(v) To create a shallow copy of the dictionary.
- new = dict_samp.copy()
Q18.
(a) To capitalize the first letter of the string str.
- str.capitalize()
(d) To remove all the whitespaces from the left and right of the string.
- str.lstrip()
- str.rstrip()
(c) To check whether the string is a 'title-cased' string or not.
- str.istitle()
(d) To count the occurrence of the character 'A' in the string.
- str.count('A')
(e) To print the character at index position 5.
- str[5]
Equestriadash:
Thanks for the Brainliest! ^_^"
Similar questions