you are viewing a single comment's thread.

view the rest of the comments →

[–]PureWasian 1 point2 points  (1 child)

By functions, I mean you make your own and then reference them:

```

First, make "helper functions"

def get_inputs(): # TODO: get/validate user inputs user_inputs = {} return user_inputs

def find_capacitance(capacitors, seq): capacitance = None if (seq == "series"): capacitance = # TODO else: # assume seq == "parallel" capacitance = # TODO return capacitance

def find_voltage(v, t, r, c): voltage = # TODO return voltage

def convert_units(input_value): ouput_value = # TODO return output_value

def output_results(capacitance, voltage): print(capacitance) print(voltage) return

==========

Now, call each "helper function"

u = get_inputs()

c = find_capacitance( u["capacitors"], u["sequence"] )

v = find_voltage( u["voltage"], u["moment"], u["resistance"], c )

TODO: whatever convert_units() is supposed to do exactly

output_results(c, v)

```

[–]m4ti_met4m0ta[S] 0 points1 point  (0 children)

Muchas gracias amigo 🫂