Professional Documents
Culture Documents
Python For Og Lecture 16 Nested If Else If Elif Else
Python For Og Lecture 16 Nested If Else If Elif Else
Python For Og Lecture 16 Nested If Else If Elif Else
Website - https://petroleumfromscratchin.wordpress.com/
LinkedIn - https://www.linkedin.com/company/petroleum-from-scratch
YouTube - https://www.youtube.com/channel/UC_lT10npISN5V32HDLAklsw
API Gravity
if elif else
/
1/30/2021 Python for O&G Lecture 16 - Nested if else & If elif else - Colaboratory
ASSIGNMENT 7
Given:
max_porosity = float(input('What is the maximum porosity for current grain packing structure? '))
if max_porosity == 0.476:
print('It is Cubic Packing')
elif max_porosity == 0.395:
print('It is Hexagonal Packing')
elif max_porosity == 0.260:
print('It is Rhombohedral paking')
elif max_porosity == 0.302:
print('It is Tetragonal Packing') /
1/30/2021 Python for O&G Lecture 16 - Nested if else & If elif else - Colaboratory
p ( g g )
else:
print('This kind of packing does not match any of the available options')
What is the maximum porosity for current grain packing structure? 0.395
It is Hexagonal Packing