I am completely lost with the first python project

Hello, I’ve gone through the whole python curriculum and read through Chuck Severance’s book multiple times, I’ve gone through Mike Dane’s python course multiple times, I’ve read through other python courses, and read through the book Learn Python but I am still completely lost on the first project: Arithmetic Formatter. I’ve made practice problems on Atom as I learned and even made a quizlet to help me remember syntax but I’m still lost. I can sort of start it and I understand what needs to be done but I don’t understand how. I’ve tried messing around with it for 3 days now and I checked on other people’s final projects and just don’t understand how they got there. Please help I am in no way rushing through material I spend all day trying to learn and think but I can’t seem to figure out how to fully put python to use. Thank you for reading.

this is the link to my repl:

you write about reading a lot, and doing some quiz. If you have never completed a project before it’s completely normal to find it difficult.

Try to break it down, forget Python syntax, take pen and paper, or whiteboard, and try to take the input and manually do the steps that would bring from the input to the output. Once you find an algorithm that does that, you can then try to translate it in Python.

1 Like

about your code…

  for i in problems:
    a = i.split()
    firstnums = a[0]
    oppys = a[1]
    secondnums = a[2]

what do you want firstnums, oppys, and secondnums to be? as you did that they are just strings

also putting the if statements outside the loop will make so that only the last problem is checked against the conditions

Thank you very much I will try writing it out on paper first then. Take care!

Try visualizing your code here Visualize code
It helped me figure out where I went wrong in the first project.

I finished this yesterday and it was my first Python project, although I do have previous programming experience.

The advice to break the problem into manageable chunks is well worth listening to. I viewed this is a string building exercise and my program effectively does the following:
Parses the input string and stores the values in lists (one for top row and another for second row).
If sum is true then calculate the sum of each operation and store the results in a list
Calculates the lengths of each operation
Builds the string one row at a time, from top to bottom

It took me a while to get the formatting right (hint don’t terminate the last line with ‘\n’) but I got there.

1 Like