Computers and Technology

Write a program that keeps track of where cars are located in a parking garage to estimate the time to retrieve a car when the garage is full. This program will demonstrate the following:How to create a list for use as a stack, How to enter and change data in a stack. Solving the ProblemStep 1In Python, the stack data structure is actually implemented using the list data structure with a few additional functions. These functions come as part of the list structure, so it is really more about how to access the list to make it function like a stack rather than it actually being a different data structure from the list. Step 2To add cars to the stack, use the append method of the list structure like you would with any normal list. Step 3To find how long it will take to retrieve a certain car, you will have to use the pop() function of the list until you find the required vehicle in the garage stack and count the number of vehicles. Step 4Once the number of cars in front of the vehicle are found, the time taken to retrieve the car can be calculated based on the average time it takes to move a vehicle plus the time to retrieve the car. Step 5Finally, the estimated time to retrieve the vehicle can be output to the user to inform the car owner. Documentation Guidelines:Use good programming style (e. g., indentation for readability) and document each of your program parts with the following items (the items shown between the '<' and '>' angle brackets are only placeholders. You should replace the placeholders and the comments between them with your specific information). Your cover sheet should have some of the same information, but what follows should be at the top of each program's sheet of source code. Some lines of code should have an explanation of what is to be accomplished, this will allow someone supporting your code years later to comprehend your purpose. Be brief and to the point. Start your design by writing comment lines of pseudocode. Once that is complete, begin adding executable lines. Finally run and test your program.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:30, enazer
Type the correct answer in the box. spell all words correctly. what kind of graph or chart does this image represent? the given image represents a (blank).
Answers: 2
image
Computers and Technology, 23.06.2019 01:20, sosick90501
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
image
Computers and Technology, 23.06.2019 12:30, legend101xD
Animations and transitions are added from the
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, azainababbas
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
Do you know the correct answer?
Write a program that keeps track of where cars are located in a parking garage to estimate the time...

Questions in other subjects:

Konu
Mathematics, 29.04.2021 20:20
Konu
Mathematics, 29.04.2021 20:20