I did my own code since I wanted to try it my way first and then see the answer in the video, but i’m getting the following error when running my code: Error: EOF when reading a line
Edit: No idea how to paste code here (i’m dumb) so here’s a picture:
I wasn’t even totally finished, just trying to see if what I had so far was working. Can someone help me out here and explain or just correct my code so that it works?
Edit2: Also, I’m 100% sure my code isnt the most efficient or w/e but im still learning. Still, i would love to make it work as close as possible to the way I currently have it.
I’m not sure why that’d be the case but perhaps some pycharm settings are configured in a way that winds up with the input statement failing (perhaps a print of the name where the variable is stored could help and after too to see if it’s skipped or what). A quick web serach seems to suggest a few folks have come across a similar issue so hopefully there’s a solution out there somewhere.
Ah no, that’s something else entirely. Or at least not just Pycharm having a problem with input(). Exit code 0 suggests a successful run of the code. The wee warning from Pycharm from the cursor position is straightforward. When running that code that partciular line cannot be reached. All in all the code seems to be running just fine. What did you expect to get out (did you ask for it)?
Expecting it is one thing but have you actually tried it? Nothing will happen unless you ask it to. Just to note that def cheapest_ground_shipping(3) is not how you’d call a function, it’d throw an error either way. Perhaps have a quick look back at the syntax of creating and calling functions.
@regan254 what difference are you expecting between those statements and the original version?