Ask coding questions

← Back to all posts
how do i get it to work?
SethElder1

so waht im trying to do is create a code that takes user, initail investment value, intrest rate, how long the investment is active, and how long it needs to go, then it gives how much the investment is worth each month. but it isnt working, ive looked at a example that i was given of something like this and took some of its code, but it still isnt working

Voters
SethElder1
Comments
hotnewtop
Spacecraft

I helped you with a couple bugs. Variables m and l needed to be integers. Variable r was clarified to be % anually. The output function needed to use the variable t for each month to calculate properly.

SethElder1

how do i do that? @CosmicBear

MrVoo

Don't say "it isn't working", tell what happened and what you wanted to happen.
You put everything in functions, but never ran the functions.

SethElder1

i want to know how to make it output a list of numbers, and these numbers are what number of month it is (for instance month 14) and i want it to say what the total investment is worth for that month (so month 14 is worth $1000) as for what happened when i ran the code, it said nothing, no errors occured, and it returned nothing @MrVoo

CosmicBear

@SethElder1 Just get the inputs and run the functions.

SethElder1

what happened when i ran the code was nothing, i ran the code ans it said nothing, no errors occured, it didnt return anything, other than a black screen @MrVoo

SethElder1

how do i get it to do that? @CosmicBear

SethElder1

how do i do that? @CosmicBear

MrVoo

@SethElder1 Run the functions, all you have are functions. functionName()

CosmicBear

@SethElder1 Maybe learn some python from a tutorial first. https://www.w3schools.com/python/python_functions.asp