473,395 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Making a money managing program with python

Hello everyone,
i need some help on my programming in python
i am trying to make a program that can ask for information and document it on a excel spreadsheet. Im a beginner programmer and i am really confused :S

this is what i have so far:

Expand|Select|Wrap|Line Numbers
  1. print "Welcome to Money Manager"
  2. print "-----------"
  3. print
  4.  
  5. ws1 = File "C:\Users\vista user\Desktop\Money Manager.xlsx"
  6.  
  7. print "What is the month today?"
  8. print "1 January"
  9. print "2 February"
  10. print "3 March
  11. print "
  12. print
  13.  
  14. month = input
  15.  
  16. if month == 
  17.  
  18. print "Please select an option:"
  19. print "1 Money Used"
  20. print "2 Money Recieved"
  21. print
  22.  
  23. option = input
  24.  
  25. if option == 1:
  26.     Used = input("Please enter the money used: ")
  27.     ws1.Cells(4,2).Value = Used
  28.     Moneyleft = ws1.Cells(3,6) - Used
  29.     ws1.Cells(4,6).Value = Moneyleft
  30.     Why = input("What was the money used for? ")
  31.     ws1.Cells(4,4).Value = Why
  32.     print "You Have", Moneyleft, "left"
  33. elif option == 2:
  34.     Recieved = input("Please enter the money recieved: ")
  35.     Moneyleft = ws1.Cells(3,6) + Recieved
  36.  
  37.  
  38. input("<press return to end program>")
the elif option == 2 part is not finished because i am confused about wat to do. Also, i would like the program to ask for the date of the month as well and document the date in the spreadsheet link given above. and this program that i made doesnt seem to be working either. :S Please help me!! :((
Jan 10 '09 #1
2 3793
bvdet
2,851 Expert Mod 2GB
What means do you intend to use to in interface with Excel? An example of writing to an Excel file can be found here.

You can get user input using raw_input().
Expand|Select|Wrap|Line Numbers
  1. >>> month = int(raw_input("Enter month (1-12)"))
  2. >>> month
  3. 12
  4. >>> option = raw_input("Enter Option Number: (1)Money Used, (2)Money Received")
  5. >>> option
  6. '1'
  7. >>> 
HTH
Jan 10 '09 #2
aberry
10
your program is not clear to me... it is missing something ...

1) please state clearly what do you want to achieve, use Excel api to read xls.

2) While doing comparison make sure you get input option as 'int' or 'string'
better to have option value as int using
int(raw_input('text here ....'))
3) If you want to end programming by pressing any key ... we have to put input option in ... while loop and certain value it should exit (say pressing 'X' and enter)

it will be great if you attach Excel sheet and mention what do you want to archive...
Jan 13 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andrei D. | last post by:
Hello Python newsgroup, In the process of developing a big ssh wrapper for sending commands to multiple hosts over the last few months, I (almost accidentally, considering I'm really just an...
24
by: Batista, Facundo | last post by:
Here I send it. Suggestions and all kinds of recomendations are more than welcomed. If it all goes ok, it'll be a PEP when I finish writing the code. Thank you. .. Facundo
11
by: Mark | last post by:
Hi, For the last 2 years I've been developing vehicle tracking/telemetric software for a company as a self employed individual. The project is quiet big, and is going to be there flagship...
4
by: Chelonian | last post by:
I'm considering trying to learn Python for a specific reason, and hoped the group might help me get a sense for whether it would be worth my time. The situation... Me: total beginner w/ a...
1
by: bigmaddaz | last post by:
Ok im designing an application for working out compount interest. The user starts the page, 3 prompts appear, one asking for money invested, next asking for rate of interest, and last one asking for...
3
by: Ben Finney | last post by:
Howdy all, For making a Python program calve off an independent daemon process of itself, I found Carl J. Schroeder's recipe in the ASPN Python Cookbook....
4
by: Venkatraman.S. | last post by:
Hi, Am sure many would have stumbled on this situation while developing an application in Python which is highly driven by configuration/ properties. I have an application (obviously written...
3
by: Stephan Diehl | last post by:
Hi lazyweb, I'm wondering, if there is a usable money data type for python available. A quick search in pypi and google didn't convey anything, even though the decimal data type seemed to be...
0
by: mathieu | last post by:
Hi there, I am currently involved in managing a large python/c++ project (using swig to automagically wrap c++ code to python). So far my current experience was that python was a second class...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.