The script starts inside the while True loop, prompting you with "Enter volts: ". The characters you type are stored in the text variable. Then V = float(text) converts the characters you have typed from text into a floating point value and stores the result in a variable named V. It repeats those steps for loading the ohms value you enter into the variable R.
while True: text = input("Enter volts: ") V = float(text) text = input("Enter ohms: ") R = float(text)
Since V and R are known, the I = V / R form of the Ohm’s Law equation calculates the current value I.
I = V / R
After printing "I = ", the value of I, and the “A” unit, the script prints an empty line. After that, the while True loop repeats so that you can calculate another current value.
print("I = ", I, "A") print()
Try modifying your script to calculate volts from amps and ohms.