Can't figure out repl.it boilerplate-arithmetic-formatter

I’m new to Python, and forking, and repl.it. I’m trying to just get started with the first project, which is called the “arithmetic formatter”… But I can’t even seem to get “Hello World” to work? Actually, if I start fresh and don’t make any changes at all, when I click run I get traceback error. How do I start using this IDE?

Here is the link: https://repl.it/@pj789/boilerplate-arithmetic-formatter-8#main.py

Here is my error: python main.py
Traceback (most recent call last):
File “main.py”, line 6, in
print(arithmetic_arranger([“32 + 698”, “3801 - 2”, “45 + 43”, “123 + 49”]))
File “/home/runner/boilerplate-arithmetic-formatter-8/arithmetic_arranger.py”, line 4, in arithmetic_arranger
return arranged_problems
NameError: name ‘arranged_problems’ is not defined

Please help a newbie out?
-James

No worries, you found the place to get started :slight_smile:

First of all, this repl is made for this problem only, so every code you write there will be tested and evaluated against the desired outcome of this problem (if you look at the test_module.py you can see what is tested). So it’s no wonder ‘Hello World’ does not what you want it to do.

If you are new to Python, maybe you can look into some lessons of the curriculum to get the hang of it and try some things in a text editor (Sublime, Atom, …)(like you maybe have done with other languages?)
Next to basics, for the assignements in this part of Python understanding defining functions is crucial too.

Good luck!

Thank you for taking the time to reply to me. You’ve confirmed what I’ve suspected. I’ve never had the luxury of being tested this way before. I’ve learned the good old hard way in the past from books in the past (early 1990s). I will say I do like this learning environment that is available to us in today’s world. I will have to step up my game to get through this. I am a bit more accustomed to starting my code one step at a time and getting those to work before continuing. I feel this repl project is quite complex for a first try, but I also feel I can get through it if I keep at it.

Again, thanks!

Sounds like you are a resilient person! Another tip I would like to share with you (from own experience after picking it up here): If you are writing code and want to test it in parts (or the complete thing if it’s not too long* ), using pythontutor.com has helped me gaining insight in what happens when running code. It shows step by step what the outcome of each line is and gives a great view on what goes wrong at which point in the program. This might connect very well to the way of starting code one step at the time and building it up gradually.

*) long pieces of code cannot be processed on this site, but this has encouraged me to become creative in cutting it up into smaller blocks, which was educational for trouble shooting too :wink:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.