PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
def intro():
print('Welcome to BASIC ELECTRICS FORMULA SOLVER!')
selection = input('''\nPlease select what formula you would like to solve:
\nfor SERIES RESISTANCE, enter 'series' for PARALLEL RESISTANCE, enter 'par'
for OHMS LAW (VOLTAGE), enter 'vohms' for OHMS LAW (CURRENT), enter 'iohms'
for OHMS LAW (RESISTANCE), enter 'rohms)
''')
if selection.lower() == 'series':
series_res()
if selection.lower() == 'par':
par_resist()
if selection.lower() == 'vohms':
ohms_vlaw()
if selection.lower() == 'iohms':
ohms_ilaw()
if selection.lower() == 'rohms':
ohms_rlaw()
else:
print('\nYou have entered an incorrect selection.')
intro()
def another_calc():
selection = input('''\nPlease select the next formula you would like to solve:
\nfor SERIES RESISTANCE, enter 'series' for PARALLEL RESISTANCE, enter 'par'
for OHMS LAW (VOLTAGE), enter 'vohms' for OHMS LAW (CURRENT), enter 'iohms'
for OHMS LAW (RESISTANCE), eneter 'rohms)
''')
if selection.lower() == 'series':
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run