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 C++ program to find the largest element of a given array of integers.
Program to find smallest and largest number in array
Build app for icecream parlor using file handling to record daily sales. Icecream parlor offers 10 flavours icecreams. Each has different price per scoop. Different flavours rates, description and rate/scoop are stored in file named flavors.txt. Also for each flavor sugarfree version also exists. It has same flavor and description but rate is 20% more than original per scoop price . There is no separate file or record for sugar free types. Build an interface by yourself.
A sale is done by selecting flavor from the list. Customer specifies the number of scoops & bill is calculated. If sugar free checkbox is selected then price is recalculated as mentioned above and bill is adjusted accordingly. Upon finishing a sale, sale record is saved in file named sales.txt. This file will contain record of all the sales of the day. Also create a separate file named total.txt. This file will contain just one number which is grand total of all the sales done
Write a shell script using Nested for loops of your own and explain each statement of that script. Explanation
Write a shell script to determine if an input number is a palindrome or not.
Write a shell script that, given a file name as the argument will write the even numbered line to a file with name even file and odd numbered lines in a text file called odd file.
Write a menu driven shell script using the select statement to print calories for food items such as pizza, burger, Salad, Pasta etc
Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolute value of y, and the square root of (xy to the power of z).