Question 4 [20 marks]
should work according to the following specifications: 
− Read the edge length of a cube.
− Calculate the area and volume of the cube using the following formulas:
Area = 6 *(edge length)2
volume = (edge length)3
− Print the edge length, area and volume in the output window.
b. Run your program with two different values of edge length. In your Solution
document insert two screenshots showing the different resulted output.
to the following specifications: 
– Ask the user if he wants to buy a "pc" or a "laptop". Read the answer
from the user and store it in a variable.
– If the user selected a "laptop" then ask the user to select which color he
wants "white" or "black". Read the answer from the user and store it in a
– Calculate the price of the user selection as follows:
- PC: 1700$.
- Black laptop: 2500$.
- White laptop: 3000$.
– Give the following discount on the price and calculate the discounted
price as follows:
- PC: 20%.
- Black laptop: 15%.
- White laptop: 10%.
– Print the user selection, price and discounted price in the output window.
– Assume that all strings used in the program and entered by a user are in
b. Test your program and run it to make sure it works properly. In your Solution
document insert three screenshots for the output:
– One showing the case when the user selected to buy a PC.
– One showing the case when the user selected to buy a black laptop.
– One showing the case when the user selected to buy a white laptop.
Important note: In your answers to question4, you should follow good
programming style that helps readability. This includes: