Posts

Showing posts with the label validation

Data Validation. in PYTHON

Programe is: # #     Data validation #     x is a positive number #     y is the number in a set set SET #     z is a number in a range (a; b) #     w is less than A #     v is a number greater than A #     Function ispositive (x) return True if x is positive #     Function isinset (y) return True if y is a member in SET #     Function isinrange (z, a, b) return True if z <b and a <z #     Function isless (w, A) return True if w <A #     Function isgreather (v, B) return True if B <v def ispositive(x):     Beta = x.isdigit()     if Beta == True:         Gama = float(x)     else:         return False     if Gama > 0:         return True     else:         return false X1 = '10' print(...