Answer:
Amount of air left in the cylinder=m
=0.357 Kg
The amount of heat transfer=Q=0
Explanation:
Given
Initial pressure=P1=300 KPa
Initial volume=V1=0.2
Initial temperature=T
=20 C
Final Volume=
=0.1 
Using gas equation

m1==(300*0.2)/(.287*293)
m1=0.714 Kg
Similarly
m2=(P2*V2)/R*T2
m2=(300*0.1)/(0.287*293)
m2=0.357 Kg
Now calculate mass of air left,where me is the mass of air left.
me=m2-m1
me=0.715-0.357
mass of air left=me=0.357 Kg
To find heat transfer we need to apply energy balance equation.

Where me=m1-m2
And as the temperature remains constant,hence the enthalpy also remains constant.
h1=h2=he=h
Q=(me-(m1-m2))*h
me=m1-me
Thus heat transfer=Q=0
Explanation:
def checklist(a_list, a_value):// def //used to name a function, the //arguments being passed into the //functions are a_list and a_value
if a_value in list://if statement to
//check if it's in the list or not
print("")//print statement to do
//nothing
else://else statement for if the
//a_value is in a_list
a_list.append(a_value)//this adds
//the value to the list
:nanjan lang din yan sa binasa mo ne........