Online Cake Ordering System: 1) Add a new order 2) Retrieve an order 3) Deliver an order 4) Print summary report 5) Exit system
Add a new order
Retrieve an order
The system shall retrieve and remove the order (with the nearest delivery data and time) from the binary heap data structure and update the status as “in progress” and move the order into a queue data structure.
Deliver an order
The user will retrieve a work in progress order from queue based on first in first out (FIFO) concept and move the order to a stack. Status of the order will be updated as “delivered”.
View summary report
Note: No built-in classes of the data structure (heap, queue and stack) are allowed.
Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0 format.
CONTINUATION..
For example, for the string "aaa", the output should be the following.
aaa is missing letters bcdefghijklmnopqrstuvwxyz
If the string has all the letters in alphabet, the output should say it uses all the letters. For example, the output for the string alphabet itself would be the following.
abcdefghijklmnopqrstuvwxyz uses all the letters
Print a line like one of the above for each of the strings in test_miss.
Submit your Python program. It should include the following.
Write a function called missing_letters that takes a string parameter and returns a new string with all the letters of the alphabet that are not in the argument string. The letters in the returned string should be in alphabetical order.
Your implementation should use a histogram from the histogram function. It should also use the global variable alphabet. It should use this global variable directly, not through an argument or a local copy. It should loop over the letters in alphabet to determine which are missing from the input parameter.
The function missing_letters should combine the list of missing letters into a string and return that string.
Write a loop over the strings in list test_miss and call missing_letters with each string. Print a line for each string listing the missing letters.
QUESTION NOT COMPLETE BUT TO BE CONTINUED...
Write a function n called is_descending that takes a list of numbers and returs True if the elements are in descending order and False if not. It should just check the users input if its in descending order and returns true if it is and if not false
Write a program that reads integers from the user and stores them in a list. Yourprogram should continue reading values until the user enters 0. Then it should display all of the values entered by the user (except for the 0) in order from smallest to largest,with one value appearing on each line.
Write a program ( using loop ) that reads five marks and computes the average. Use the sample code from today’s lesson on adding three numbers to help you get started.
b) Modify the program to also output the lowest and highest mark.
c) Modify the program to check if the mark entered is between 0 and 100.
d) Modify the program to ask the user to enter -1 when done entering marks.
e) Write the same program using Try and except statement
Write a program using function called remove_duplicates that takes a list and returns a new list with only the unique elements from the original list. For example remove_duplicates([1, 2, 3, 3, 4, 2, 1, 5]) would return [1, 2, 3, 4, 5].
Write a program using function called cumulative_sum that takes a list of numbers and returns the cumulative sum; that is, a new list where the nth element is the sum of the first n elements from the original list. For example, the cumulative sum of [1, 2, 3] is [1, 3, 6].