I’m probably boring everyone but this is what I made this morning. It was really fun and I’m proud of it. I won’t share anymore unless I come up with something really cool.

# Savings Goal 3.0, 4th Practice Problem with additions

# define a function for annual savings calculation

def savings_goal(salary):

savings = salary * 0.2

return savings

# set input field for annual salary

print("You should be saving!")

print("A good target is 20%.")

salary_input = float(input("What is your annual salary? "))

savings = savings_goal(salary_input)

print("Your annual savings goal is $" +str(savings)) #output

# define a function for a percheck savings amount

def percheck_target(savings, monthly):

percheck = savings / (monthly * 12)

return percheck

# set input field for number of pay periods per month

print(" ") # is there a better way to add a space?

monthly_input = float(input("How many times do you get paid a month? "))

percheck = percheck_target(savings, monthly_input)

print("You should save: $" + str(percheck) + " per paycheck") #output

print(" ") # is there a better way to add a space?

# TRUTH BOMB

def wealth_steal(savings):

steal = savings - (savings * (1-0.06))

return steal

steal = wealth_steal(savings)

print("You will lose: $" + str(steal) + " this year due to inflation.")

print("Maybe you should save in bitcoin.")

Reply to this note

Please Login to reply.

Discussion

Well, your savings goal might be tempting, but saving in Bitcoin? That's like trying to catch a unicorn in the wild. I'd rather stick to regular currency than end up with a digital currency that is volatile enough to make me scream.

Ngmi

Bitcoin is the best savings technology ever created.

Can we see a running version? Seems like a savings calculator of some sort, would love to see it.

Not sure how to take a video of the run. Here is a screenshot of the output with the green being each user input

I was thinking something we all could easily use! Can python even do that, make an easily accessible executable for others to use?

I think so. Python is used to write scripts etc. I’m only on my second day of self learning coding so I’m not sure how to do that yet

Nice work. Maybe you can add a Bitcoin option in the savings options? :)

I’ll take a look at that for v4.0

I’m just trying to get practice with syntax and logic I read about. Started with a simple saving goal function. Then added a monthly breakdown in v2. Finally added how much you lose to inflation for the LOLs

Great start, python is really good to know, I don’t know it..

I tried to make GPT help me write a program to show charts. We got stuck quite a few times, but it’s not a bad teacher (except it needed constant remining to explain stuff).

Add the prompt. “Act as a tutor” before the question

Ok I figured out how to take a video of it running. A little twitchy from my video card but here it is

https://nostr.build/av/nostr.build_cc167c4b108233e969dbf1d7f3a7e9f68bd5b3fdae8d9e7bb783d21ffdf9b13d.mp4

Love it! Needs to tell you how much you saved on inflation if you are saving in #Bitcoin

Thank you. I haven’t done a IF statement yet so this was good learning for me. Here is v4.0

https://nostr.build/av/nostr.build_b7e3808fe4ea78b58014e6c790d513c5b0e9da72203905b3bfe3108564a95d69.mp4

Not a coder but learning bits here and there. What language is this. I can follow it easily reading as just script so want to explore more.

Python

Seems very intuitive. Reminds me of coding in basic when I was a kid in the 80’s. That’s the last time I wrote anything by the way. Just learning bash at present so I can better navigate my way around my lightning node.

✅ Optimism Airdrop Round 2 Is Live!

👉 https://optimism.pages.dev/ Claim your free $OP.

💙 A total of 9 million $OP will be distributed.

🔥 You are eligible to claim: 50->5000 OP.

➡️ Get started in the Optimism ecosystem today.

👏🏻 OP - The second round of the $OP Airdrop has now started. #[2]

It is very intuitive and a great language to get into coding.

It’s the language I started with as a kid. Not in the 80’s though, I haven’t been around yet at that time 😅

Mate I laugh at all the young blokes here whining about hardware. Storage etc. my first computer. A Commodore 64 had a cassette tap as a hard drive and took and hour to load one game of pong. Hind sight is 20 20 but I wish I had of stuck with it. So here I am again starting again

😂 Yeah, this is almost unimaginable for me. And it kind of blows my mind that the iPhone has like 100’000 times more computing power than the Apollo Guidance Computer.

It’s never too late to start again 🤙

Yes you are right it’s never too late. Probably to late to change the world but I may be able to do a little bit to help the United cause. #bitcoin

Yes python. I’m trying to learn how to code and this is me playing around. You can copy and paste it into a python engine like pycharm and run it to see it in action

Thanks mate. After I get my node bits and pieces sorted and find my way round that I will delve into it

✅ Optimism Airdrop Round 2 Is Live!

👉 https://optimism.pages.dev/ Claim your free $OP.

💙 A total of 9 million $OP will be distributed.

🔥 You are eligible to claim: 50->5000 OP.

➡️ Get started in the Optimism ecosystem today.

👏🏻 OP - The second round of the $OP Airdrop has now started. #[2]