☑Kizspy.me
5
Zoom
INPUT:
(Create a computer store with OrderQueue and Cargo Tree containing 5 nodes)
data.txt (This file stores data)
1 (Choose the question f1())
OUTPUT:
Order Queue:
A, Pepsi
E, Tea
B, Gum
G, Candy
H, USB
Cargo Tree:
A, Pepsi, 1500
B, Gum, 120
E, Tea, 1000
G, Candy, 1000
H, USB, 15
b. f2(): To complete the requirement f2, students need to perform this specific task:
implement the search() function with the given id of the Cargo Tree structure, then:
o Return the found Cargo, or
o If the id is not found, then return None.
。 You also need to call search() in the f2() function
The expected input/output used to test your code are as follows:
+ 100%
Close