I have written a code in Python which outputs a single value and I want to write a code that classifies that single output value depending on different statements.
My code gives me the value of 'Vk' and I want Python to classify automatically the value and output the statement based on these conditions and ranges:
I have tried the following but no output was printed:
if (Vk = 0):
st = 'Ideal Homogenous'
if (0 < Vk < 0.25):
st = 'Slightly Heterogenous'
if (0.25 < Vk < 0.50):
st = ' Heterogenous'
if (0.50 < Vk < 0.75):
st = 'Very Heterogenous'
if (0.75 < Vk < 1):
st = 'Extremely Heterogenous'
if (Vk = 1):
st = 'Perfectly Heterogenous'
Any suggestions? Thanks!
Aucun commentaire:
Enregistrer un commentaire