mercredi 15 juillet 2020

Use of conditional statements to classify output value

I have written a code in Python which outputs a single value and I want to classify that single output value depending on different conditions and ranges, which are:

enter image description here

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'

Aucun commentaire:

Enregistrer un commentaire