how do i compute multiple levels in python?

It depends on the type of A, B, C, and X. I am considering them of type string class.

if int(record.A or record.B) != 0 and int(record.C) == 1:

        record.X = str(int(record.A) / int(record.B)) 
        # converting string to int while doing math operation and then converting the result to strting.
else:
    record.X = record.A    

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top