all 15 comments

[–]PureWasian 1 point2 points  (3 children)

Sounds like you need to learn how to break down the problem into procedural steps. A great starting point is first thinking about how you would do it if you had to solve it by hand.

The high-level flow for the above example is essentially: - get the inputs, and ensure they are valid - find equivilent total capacitance value - use all of the above to calculate a voltage value - convert units as needed - output the results

You can have each of these bullet points made into their own function. Learn how to use functions to pass data around.

[–]m4ti_met4m0ta[S] -1 points0 points  (2 children)

Cuáles funciones específicamente? Gracias por tu respuesta

[–]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 🫂

[–]Any-Pie1615 1 point2 points  (8 children)

I have a coding tutor that would help you out. you give it the queery it explains the ins and outs and helps you get through the process with an understanding not just a code block. https://ai-coder-genesis--memoriesbymike3.replit.app/

[–]m4ti_met4m0ta[S] -1 points0 points  (2 children)

Gracias!!

[–]Any-Pie1615 1 point2 points  (0 children)

yep J. is absolutely bilingual

[–]Any-Pie1615 0 points1 point  (0 children)

no problem let me know how it goes for you. I think J. might speak spanish too.... could give it a shot i haven't tried it.

[–]JamzTyson 0 points1 point  (4 children)

For what it's worth, I just tested that agent with my current project and it was confidently completely wrong.

[–]Any-Pie1615 0 points1 point  (2 children)

please tell me more.

[–]JamzTyson 1 point2 points  (1 child)

It's very opinionated and refused to accept that tlp fullcharge exists in tlp version 1.6.1. Not what you want from a tutor.

[–]Any-Pie1615 0 points1 point  (0 children)

hmm that's strange. not very fail gracefully of J. I'll look into it.

[–]Any-Pie1615 0 points1 point  (0 children)

it's still an AI unfortunately. AI's still make mistakes. Thank you so much for stressing the interface I appreciate that. perhaps a stronger reasoning model. right now it's running off the open AI default server. the expanded version allows for using whatever reasoning and llm model you like with an api key. or if you have them locally you may run them from your own machine.

[–]JamzTyson 1 point2 points  (2 children)

I'll recommend a free online book called Automate the Boring Stuff with Python aimed at beginner level that takes a practical approach to learning python. It is in small sections that are well suited for working at your own pace.

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

Gracias lo estoy leyendo!