LU04.L04: U = R * I

Blockly

Python

volt = input('U > ')
ohm = input('R > ')
ampere = input('I > ')
if volt == '?':
    volt = float(ohm) * float(ampere)
    print('Resultat U = ', volt, ' Volt')
elif ohm == '?':
    ohm = float(volt) / float(ampere)
    print('Resultat R = ', ohm, ' Ohm')
else:
    ampere = float(volt) / float(ohm)
    print('Resultat I = ', ampere, ' Ampere')