Python Forum
How will you improve my code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How will you improve my code?
#5
You seem to be passing the return value of input to str in several places (e.g. lines 3 and 20 in the code in the first post). That's unnecessary, since input already returns a string.

The code is also quite dense, particularly the loanscheme function.It would be more readable if it were split into smaller functions each doing one specific thing that were then called from loanscheme. Also, adding blank lines between sections of code even within a function helps readability, much like how you'd use paragraphs in writing to split up different thoughts, etc.
Reply


Messages In This Thread
How will you improve my code? - by Gateux - Jul-17-2019, 02:35 PM
RE: How will you improve my code? - by Yoriz - Jul-17-2019, 06:24 PM
RE: How will you improve my code? - by metulburr - Jul-17-2019, 06:26 PM
RE: How will you improve my code? - by Yoriz - Jul-17-2019, 06:50 PM
RE: How will you improve my code? - by ndc85430 - Jul-20-2019, 12:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do I improve string similarity in my current code? SUGSKY 3 2,366 May-28-2020, 05:16 AM
Last Post: deanhystad
  Improve this code (Receipt alike) Leonzxd 10 7,870 Jun-26-2018, 03:33 PM
Last Post: Leonzxd

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020