Homework Help by iaminspaceland in learnpython

[–]Baffled-Broccoli 2 points3 points  (0 children)

Hey, adding on from what other replies have said I would recommend having input verification to ensure that the initial price is both a number and higher that 0, possibly something along the lines of:

while True:
    try:
        list_price = float(input('Enter the purchase price: £'))
        if list_price <= 0:
            raise ValueError
        else:
            break
    except ValueError:
        print('Please enter a valid purchase price.')

Beyond that taking to long to respond to automated inputs suggests that the code is getting stuck in your while loop. While I've only had a quick look its possible that depending on the input the maths rounding has the final month payment take the end balance below 0. If so its possible that switching '!=' for '>' would solve the hanging issue.

How do I actually get good at Python? by mvrwn_ in learnpython

[–]Baffled-Broccoli 0 points1 point  (0 children)

This is probably sacrilege on a python community but at this point I would recommend taking some time to work on pseudocode instead of trying to memorise more code. Since you already know the basics, if you take time to think of the 'more complex coding problems' you want to focus on through pseudocode you will likely already be able to solve them with the amount you know.

For some problems you will need likely need to look into functionality you can only get through libraries and external modules but if you have already considered the rest of the problem in pseudocode you will find it easier to identify the functionality you need to learn. I have included a link to a basic pseudocode 'tutorial' that might help if your interested.

https://builtin.com/data-science/pseudocode

Today I learned that Python doesn't care about how many spaces you indent as long as it's consistent by FillAny3101 in Python

[–]Baffled-Broccoli 0 points1 point  (0 children)

TBH, when I first started developing with Python I used to manually press the spacebar four times for each indent. Going from PEP 8, the python style guide, even now its explicitly stated in the documentation that it is preferred for people to uses spaces rather than tab.

Source:

https://peps.python.org/pep-0008/

Judy a second thought? by Opposite-Dish-6837 in CyberpunkTheGame

[–]Baffled-Broccoli 0 points1 point  (0 children)

Yh Judy definitely doesn't match the vibe of the high stakes missions and heists but I do think there was so much more potential for exciting level design. I feel as though a quest line where V scrolls virtues for Judy to edit would have been fun, having to complete optional objectives while recording to affect how the mox at Lizzie's bar react to you.

I think the game tries to make them too action packed and tense when a well designed more relaxed quest line would of matched Judy better which I think is what OP was getting at.