Write a program that keeps a person’s name and his/her contact number in a dictionary as key- value pairs. The program should display a menu that lets the user:
a. see a list of all contacts and their numbers,
b. add a new contact and number,
c. change the number of an existing contact, and
d. delete an existing contact and number.
The program should save the dictionary when the user exits the program. Each time the program starts, it should retrieve the dictionary from the file.
For more information on file reading & writing in Python, please have a look at these websites:
https://www.geeksforgeeks.org/how-to-read-from-a-file-in-python/?ref=lbp https://www.geeksforgeeks.org/writing-to-file-in-python/?ref=lbp
1. You have to write a program to check Pak-Studies exam. The exam has 40 MCQS. You have to store correct answers in a list.
1. A 2. C 3. A 4. A 5. D 6. B 7. C 8. A 9. C 10. B
11. A 12. D 13. C 14. A 15. D 16. C 17. B 18. B 19. D 20. A
21. A 22. C
23. A 24. A 25. D
26. B 27. C 28. A
29. C 30. B
31. A 32. D 33. C
34. A 35. D 36. C
37. B 38. B 39. D
40. A
Create another list and store student answers in it. Your program should check for correct answers. A student needs to answer 30 correct answers out of 40 to pass the exam. Your program must show whether the student has passed or failed the exam, the total number of correct answers, the total number of incorrect answers and a list of incorrect questions.
Write a program to input side of a square and find the area and perimeter of a square.
It takes 4 hours to drive a distance of 150 km in car.create a program to calculate the average speed in km/h
To print 3 digit number and peint the digit of the number in reverse order
write a programm to print hard if any carry in addition of two given numbers otherwise print easy.
to input a number and print all numbers from 30 to 60 that is divisible by the input number
by CodeChum Admin
We've been dealing with integers too much, it's time for decimals to shine!
Instructions:
Input
A line containing five decimal numbers separated by a space.
1.1·1.2·1.3·1.4·1.1Output
The first line contains all the inputted decimal numbers separated by a space.
The second line contains a string which is the result.
1.1·1.2·1.3·1.4·1.1
Yesby CodeChum Admin
Well, that's odd, or is it? It's your job to find out!
Instructions:
Input
A line containing an integer
5Output
The first line contains the inputted integer.
The second line contains a string which is the result.
5
Oddby CodeChum Admin
Do you believe in doppelgangers? Well they are very much possible with strings! Check if the two given strings are the same or not.
Instructions:
Input
Two lines containing a string on each.
hello
helloOutput
The first line contains the two inputted strings separated by a \.
The second line contains a string result.
hello\hello
Equal