print('1: Mercury')
print('2: Water')
print('Please choose the substance by entering their representative number:')
x = int(input())
print('Enter the value of temperature:')
y = float(input())
if x == 1:
if y < -38.56:
print('The mercury is in solid state!')
if -38.56 > y > 356.73:
print('The mercury is in liquid state!')
if y > 356.73:
print('The mercury is in gaseous state!')
while x == 2:
z = float(input())
if z < 0:
print('The water is in solid state!')
if 0 < z < 100:
print('The water is in liquid state!')
if z > 100:
print('The water is in gaseous state!')
after the first line of if statement(if x == 1:) its true then it doesn't run the code further which is right but is their any way for me to make it so that it continues to the next if statement if the fomer one is true?
Aucun commentaire:
Enregistrer un commentaire