Ask coding questions

← Back to all posts
salary calculator
wzh14727

to calculate your salary
I am confused that how to save the py file???

Voters
wzh14727
Comments
hotnewtop
EgorKrutilin

I always count my salary and try to count money so as not to spend on unnecessary things and there is enough money, but from time to time unforeseen expenses still arise for which there is not enough money at the moment and then I have to take a small amount of money before the salary on this site PayDay Say

19ecal

if you just want to save the changes, replit does this automatically

Muffinlavania

If you want to save the salary at the end, you can just pop it into a .txt file

19ecal

@Muffinlavania You will need to close it at the end when you're done with f.close(), or use with like this

Muffinlavania

@19ecal yea sorry, forgot to include that (but everything else should work)
and f.close() is a bit easier in my opinion

RYANTADIPARTHI

Solution

everything seems to be working. But if you want to save the values and all. Two things.

  • try repl database
  • dump all info in a file.

here's a tutorial on the repl database.

https://docs.repl.it/misc/database

any of them should work