Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Tugasan 3 (Topics 6 - 8)

Q1: Develop a program that displays an isotherms profile of hydrogen gas (PV diagram)
at a range of temperature of 30 to 90 °C for 20 °C interval and at a range of pressure
between 1 – 50 bar. The profile must be completed with title, axis labels, and legend.
Make sure to differentiate the series with different markers and different line types only,
the colour of the lines and markers must be black. Assume that the gas behaves as an
Ideal Gas Law and the program should request the user to input the amount of
substance of the hydrogen.

Q2: Convert the program that has been developed in Q1 to a function format with two
input arguments: The 1st argument should be the temperature and the 2nd argument
should be the amount of substance of the hydrogen.

Submit the developed codes (Q1 and Q2) and their test runs in the command window
with generated plots and submit the file in PDF format. Name the file as your matrix no.

Hint: The Q1 plot should display 4 series lines while the Q2 plot should display a graph
with only 1 series line.

You might also like