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.
13. What is the purpose of the epi layer on the silicom?( )
a. The epi layer is used to form the gate of the transistor.
b. The epi layer provides a low defect crystal structure.
c. The epi layer has already been doped with n-type dopant to serve as the n-well.
d. The epi layer provides isolation between metal layers.
Hotel rooms in Smalltown go for $100, and
1,000 rooms are rented on a typical day.
a. To raise revenue, the mayor decides to charge
hotels a tax of $10 per rented room. After
the tax is imposed, the going rate for hotel
rooms rises to $108, and the number of rooms
rented falls to 900. Calculate the amount of
revenue this tax raises for Smalltown and the
deadweight loss of the tax. (Hint: The area of
a triangle is 1⁄2 3 base 3 height.)
b. The mayor now doubles the tax to $20. The
price rises to $116, and the number of rooms
rented falls to 800. Calculate tax revenue
and deadweight loss with this larger tax. Do
they double, more than double, or less than
double? Explain.
Write a C++ program to find the largest element of a given array of integers.
Program to find smallest and largest number in array
Calculate the approximate value of 10 to four decimal places by taking the first four
terms of an appropriate Taylor’s series.
Calculate the maximum numbers of moles and grams of iodic acid (HIO3) that can form when 631 g of iodine trichloride reacts with 169.4 g of water:
ICl3 + H2O → ICl + HIO3 + HCl
A pharmacy has determined that a healthy person should receive 70 units of proteins, 100 units of carbohydrates and 20 units of fat daily. If the store carries the six types of health food with their ingredients as shown in the table below, what blend of foods satisfies the requirements at minimum cost to the pharmacy? Make the mathematical mod
what is the time required to pass 1 F of electricity through electrolyte with a current of 0.35 ampere