What would be the output if the following code segment is ex…
What would be the output if the following code segment is executed and the user enters -500d? def validate(vString): while True: try: if float(vString) >= 0: vString = float(vString) break else: vString = input(“Negative values are not accepted. Please provide a positive value:\n”) except ValueError: vString = input(“Non-numeric values are not accepted. Please provide a numeric value:\n”) return vString d = int(validate(input(“How many pounds of coffee per year do you need to stock (D)?\n”)))
Read Details