python first project


N

ngangsia akumbo

Hi everyone,

I have been around this group for some time and i saw that we have very helpful people here.

i have been learning python just for about 5 months now and i have been given a task to do. This will be a leap into the programming industry for me.


i am programming a system that will be giving details about finance, purchase(bills pending bills and paid bill), employees record and salary details, warehouse records.

That is just all i intend to do this all on one GUI application window and to make it to be able to keep records for all the transaction which has been done inputted.

I have started programming it , but i still feel there are a lot of things i miss out.

Please i need some support from any honest person, please and also how to guide me complete this.

I am also looking for guides and sources which can help me complete it.






import os, sys

print "#" * 50

print "#" * 50

def fin_sec():
print "The financial sector"
fin_name = raw_input("Enter your Name: ")
fin_amount = input("Enter the amount for finance: ")

if fin_amount > 0:
print "We have a "DEBIT BALANCE" of", fin_amount,"FCFA"
else:
print "There is "CREDIT BALANCE" of", fin_amount, "FCFA"


print "Name of person doing the the transaction is ", fin_name
print "Amount available for finance is ", fin_amount



print "#" * 50
print "#" * 50


def purch_sec():
print "#" * 20

print "The purchase center"

purchase_name_good = raw_input("Please enter the name of good or goods purchase: ")
if not purch_name_good istitle():
purch_name_good.capitalize()
purch_price = input("Please enter the price for purchase made: ")
purch_p = raw_input("Please enter the reason of this purchase made: ")
purch_customer = raw_input("Please enter the name of customer: ")
purch_address = raw_input("Please enter the contact details for the customer: ")

print "Name of goods purchase: ", purch_name_good
print "Price of Good:",purch_price,"FCFA"
print "Reason for the purchase: ", purch_p
print "Customers name is: ", purch_customer
print "Contact: ",purch_address



def purch_Bill():
print "Regulating the Bills"

bill_total= int(input("Please enter the total bill of purchase: ")

bill_paid = int(input("Enter the bills paid in: ")

# bill_pending = input("Please enter the amount for pending bills: ")

print "The total bill paid: ", bill_total,"FCFA"

print "The amount already paid: ", bill_paid,"FCFA"

# print "The amount still left: ", bill_total - bill_paid,":::", "FCFA"


if bill_total == bill_paid:
print "Tne purchase amount was completed"
elif bill_total > bill_paid:
i = bill_total - bill_paid
print "The purchase amount left to be paid is ", i


print "DONE"


print "##" * 50

print ":::" * 50


def emp_rec():

print "Employee Record and Details"

emp_name = raw_input("Please enter the employee name: ")

emp_age = int(input("Age: ")


if emp_age > 18:
pass
else:
print "The candidate is too young to be an employee"

print "Name: ", emp_name
print "Age:", emp_age
 
Ad

Advertisements

C

Chris Angelico

purch_price = input("Please enter the price for purchase made: ")
purch_p = raw_input("Please enter the reason of this purchase made: ")

Never use input() in a Python 2 program... always use raw_input()
instead. You're mostly right, but you have a few cases where you're
using input(). Probably what you want is int(input()) or
float(input()).

Incidentally, is there a strong reason for using Python 2 for this? If
not, I'd recommend moving immediately to Python 3, as there are an
increasing number of advantages. Unless something actually binds you
to Py2, save yourself the trouble of shifting in a few years' time and
just use Py3 now.

ChrisA
 
D

Dave Angel

ngangsia akumbo said:
Hi everyone,

I have been around this group for some time and i saw that we have very helpful people here.
Welcome to the group, and to Python.
i have been learning python just for about 5 months now and i have been given a task to do. This will be a leap into the programming industry for me.
Is this a class assignment, a book assignment, a self assignment,
or is it to be used by a real business, perhaps to replace
manual methods?
i am programming a system that will be giving details about finance, purchase(bills pending bills and paid bill), employees record and salary details, warehouse records.

That is just all i intend to do this all on one GUI application window

But your code so far is all for a terminal window. Nothing wrong
with that, but if the professor is expecting GUI, that's
different. A GUI might be tkinter or qt or Wxpython or
...
and to make it to be able to keep records for all the transaction which has been done inputted.

A key point. So you need persistence. You're going to need to
write data to a file, and reread it next time the program is
run. The file might be a bunch of text lines, or it might be a
database. And it might belong to this program or be shared, even
across multiple machines.
I have started programming it , but i still feel there are a lot of things i miss out.

I second the recommendation for version 3. And I suggest that if
this is a business assignment, it's a lot harder than you think.
For example, handling dollars and cents with floats is usually a
mistake.
Please i need some support from any honest person, please and also how to guide me complete this.


--
DaveA nr



----Android NewsGroup Reader----
http://www.piaohong.tk/newsgroup
 
N

ngangsia akumbo

Welcome to the group, and to Python.





Is this a class assignment, a book assignment,

a self assignment,

This will be use for real business. The ceo in person is willing to cut the office task. I am from cameroon west africa.
or is it to be used by a real business, perhaps to replace

manual methods?







But your code so far is all for a terminal window. Nothing wrong

with that, but if the professor is expecting GUI, that's

different. A GUI might be tkinter or qt or Wxpython or

...






A key point. So you need persistence. You're going to need to

write data to a file, and reread it next time the program is

run. The file might be a bunch of text lines, or it might be a

database. And it might belong to this program or be shared, even

across multiple machines.

when i talk of record i mean details of all what will be inputed by the employees should be kept as a record.
I second the recommendation for version 3. And I suggest that if

this is a business assignment, it's a lot harder than you think.

For example, handling dollars and cents with floats is usually a

mistake.

How hard is it? Please i need your support
 
D

Denis McMahon

i have been learning python just for about 5 months now and i have been
given a task to do. This will be a leap into the programming industry
for me.

i am programming a system that will be giving details about finance,
purchase(bills pending bills and paid bill), employees record and salary
details, warehouse records.

It sounds as if your project has many aspects to it which may require you
to understand and implement many different computing tasks.

For example:

You need to either analyse the data records that are required and produce
a suitable database schema, or you need to work with an existing database
schema. This may require some competence in developing database schemas,
and will almost certainly require some sql knowledge in the chosen
database (not all sqls are equal).

You also need to develop a user interface. First of all you ned to
consider who will access the user interface, and how? Mobile devices,
desktop computers, both? Do you want os specific (eg ios, android) apps
for mobile devices, or will you run in a mobile browser window?

Will the application run on a web server, or locally on a single machine?
Or will several gui clients connect to a single server host? In the
latter case, you'll need to develop communication protocols (using a
webapp removes some of this workload, but is a compromise that may
require that you need other competences, possibly including but not
limited to html, javascript and css).

The most important phase of any project is the requirements capture, for
if you do not capture all the requirements of all the users, you will not
deliver the project that they want. Users are not just the people who sit
in front of the screens, they may also be people who will want
statistical reports based on the database, but who never expect to
actually touch a computer themselves - they have secretaries for that
sort of thing. However, if your system can't produce the report that the
CEO or CFO wants at the end of each month / quarter / year, then it will
be labelled as crap, even if no-one told you as the system designer that
this report was required!

So, first of all, you need to go and talk to everyone in the company that
will use this system and obtain from them details of what they expect the
system to do, what data they expect to input, and what data they expect
to receive as outputs from it. Once you understand this, you may be in a
position to start defining the database schema, and only then are you
ready to think about the code that will put data into, and get it from,
the database.
 
N

ngangsia akumbo

Never use input() in a Python 2 program... always use raw_input()

instead. You're mostly right, but you have a few cases where you're

using input(). Probably what you want is int(input()) or

float(input()).



Incidentally, is there a strong reason for using Python 2 for this? If

not, I'd recommend moving immediately to Python 3, as there are an

increasing number of advantages. Unless something actually binds you

to Py2, save yourself the trouble of shifting in a few years' time and

just use Py3 now.



ChrisA

Thanks for the reply
 
Ad

Advertisements

D

Dennis Lee Bieber

Taking this as a serious programming assignment...
i am programming a system that will be giving details about finance, purchase(bills pending bills and paid bill), employees record and salary details, warehouse records.
Do you have a requirements or use-case documentation, or even a manual
paper system which you would be "duplicating" on the computer? This
document should provide the information what/how the system should operate
(use-cases will be narratives showing how a user would interact with the
system, with a use-case for each potential operation [add new client, add
billing, correct errors, produce reports]).

How familiar are you with double-entry bookkeeping (accounts
receivable, etc. -- or is this just client billing application which may or
may not feed into the main company accounting system)? Tax laws? (Or is
"salary details" really just the human resources record of promotions/pay
raises, and NOT actual payroll production).

Are you familiar with relational database design and normalization?
While an object-relational mapper [ORM] may take out the need to know SQL,
they don't help you design efficient/usable databases. Or is their an
existing system/database you have to interface with.
That is just all i intend to do this all on one GUI application window and to make it to be able to keep records for all the transaction which has been done inputted.
You have three separate applications defined: stock/warehouse, human
resource/payroll, and billing/accounting. You probably do not want a single
GUI application for this (the people updating warehouse records should have
no access to employee/salary/payroll, nor to the billing system).
I am also looking for guides and sources which can help me complete it.
Text books on accounting principles, relational database design
concepts, system analysis (if there are no requirements/use-cases) which
may cross over with Object-Oriented Analysis (Object-Oriented Design would
come in AFTER the system has been analyzed; it is a bit closer to the
programming level than requirements).
<snip intro code>

So far all you show appears to be a "fill-in the form and print" sort
of application... Pretty much any spreadsheet software supports this level
of functionality.

There is no persistence between runs (that is, no tracking of
information from one run to another). Your "financial sector" basically
requires the user to already know what their balance is and is just telling
them if it is positive or negative. No ability to save a balance and later
have them add or subtract an amount from it.
 
N

ngangsia akumbo

18:32 -0800 (PST), ngangsia akumbo



Do you have a requirements or use-case documentation, or even a manual

paper system which you would be "duplicating" on the computer? This

document should provide the information what/how the system should operate

(use-cases will be narratives showing how a user would interact with the

system, with a use-case for each potential operation [add new client, add

billing, correct errors, produce reports]).

I have a paper with the instructions that was given to me, these guys just want something very simple. The CEO in concern want that every day he get in to the office , it does not matter the time. He should be able to see a record of all the transaction for that day from his desktop
How familiar are you with double-entry bookkeeping (accounts

receivable, etc.

i am not very familiar with that
or is this just client billing application which may or

may not feed into the main company accounting system)? Tax laws?

yeah just a client billing app

"salary details" really just the human resources record of promotions/pay

raises, and NOT actual payroll production).

Just salary, employee record, etc


Are you familiar with relational database design and normalization?

Not very familiar with that, but if i have the right info i can normalize in it
While an object-relational mapper [ORM] may take out the need to know SQL,

Yes i have some knowledge of sql
they don't help you design efficient/usable databases. Or is their an

existing system/database you have to interface with.

What i need to do is simple, design an app for employees, finance sector, purchase, billing, bookkeeping etc. Ok there is not IT infrastructure in this firm, they have a group of workers just doing the manual input of data. so the ceo wants this data to interact with a program that can keep track ofwhat is going in the company.






You have three separate applications defined: stock/warehouse, human

resource/payroll, and billing/accounting. You probably do not want a single

GUI application for this (the people updating warehouse records should have

no access to employee/salary/payroll, nor to the billing system).



Thanks very much for this brilliant idea


Text books on accounting principles, relational database design

concepts, system analysis (if there are no requirements/use-cases) which

may cross over with Object-Oriented Analysis (Object-Oriented Design would

come in AFTER the system has been analyzed; it is a bit closer to the

programming level than requirements).

I did not fully understand this paragraph please


<snip intro code>





There is no persistence between runs (that is, no tracking of

information from one run to another). Your "financial sector" basically

requires the user to already know what their balance is and is just telling

them if it is positive or negative. No ability to save a balance and later

have them add or subtract an amount from it.

Thanks for this point


Richard
 
W

Wolfgang Keller

i am programming a system that will be giving details about finance,
purchase(bills pending bills and paid bill), employees record and
salary details, warehouse records.

That is just all i intend to do this all on one GUI application
window and to make it to be able to keep records for all the
transaction which has been done inputted.

If "keeping records" implies significant amounts of data, then this is
a typical case of a database application.

There are a couple of Python frameworks for this kind of application:

using wxPython:
Dabo http://www.dabodev.com (already mentioned)
Defis http://sourceforge.net/projects/defis/ (Russian only)
GNUe http://www.gnuenterprise.org/

using PyQt:
Pypapi https://pypi.python.org/pypi/PyPaPi/0.8
Camelot http://www.python-camelot.com/
Qtalchemy http://www.qtalchemy.org/
Thyme http://clocksoft.co.uk/downloads/
Kexi http://www.kexi-project.org/

using PyGTK:
SQLkit http://sqlkit.argolinux.org/
Kiwi http://www.async.com.br/projects/kiwi/
Glom http://www.glom.org

Sincerely,

Wolfgang
 
C

Chris Angelico

Producing fancy reports for the CEO may be the last thing you
implement, as it relies upon having a stable database design, business
logic, and data entry.
From the sound of things, it might be the ONLY thing to implement,
though, if the answer to your previous question is "Yes" (that is, if
everything's already in a big fat database). Otherwise, the OP's going
to be replicating stuff that businesses pay good money for - a full-on
accounting and warehousing system.

ChrisA
 
Ad

Advertisements

N

ngangsia akumbo

On Sat, 11 Jan 2014 09:55:57 -0800 (PST), ngangsia akumbo

<[email protected]> declaimed the following:


What options do you think i can give the Ceo. Because from what you have outline, i think i will like to follow your advice.

If it is just some recording data stuff then some spreadsheet can do the work.

From all indication it is a very huge project.

How much do you thing all this will cost if we were to put the system all complete.
 
C

Chris Angelico

What options do you think i can give the Ceo. Because from what you have outline, i think i will like to follow your advice.

If it is just some recording data stuff then some spreadsheet can do the work.

From all indication it is a very huge project.

How much do you thing all this will cost if we were to put the system all complete.

If you currently do all your bills and things on paper, then this job
is going to be extremely daunting. Even if you don't write a single
line of code (ie you buy a ready-made system), you're going to have to
convert everybody to doing things the new way. In that case, I would
recommend getting some people together to discuss exactly what you
need to do, and then purchase an accounting, warehousing, or inventory
management system, based on what you actually need it to do.

On the other hand, if it's already being done electronically, your job
is IMMENSELY easier. Easier, but more complex to describe, because
what you're really asking for is a program that will get certain data
out of your accounting/inventory management system and display it. The
difficulty of that job depends entirely on what you're using for that
data entry.

ChrisA
 
N

ngangsia akumbo

i am not sure i will give up, i will start with a small app for stock registry.
From there i think the others will come latter.

From the info u have given me , i will continue from there on.
So now is i will try to build a small app for stock registry

may be u can still give me some tips on that
 
E

Emile van Sebille

From all indication it is a very huge project.

Yep -- I built such a system in the late 70's with a team of seven over
two-three years. Then modifications and improvements continued over the
next 20 years keeping about 2-4 programmers busy full time.
How much do you thing all this will cost if we were to put the system all complete.


A lot. In today's dollars a million or two to do it right at a
minimalist level. Going for the gold will be much more.

IMHO you'd be better off researching the existing software market for an
application suite the 'best fits' their needs and allows for
customization to fine tune things.

I'm now working with OpenERP which is python based and is OSS with a
subscription model to ensure an upgrade path. It already has most of
what you're looking for built in or available as third party addons and
is of a quality that you couldn't hope to attain in years of effort.
Which reflects the millions they've invested.

see http://www.openerp.com for more.

For an example of a commercially available entry level alternative costs
check out:

http://www.erpsoftwareblog.com/2012/10/microsoft-dynamics-gp-2013-pricing-and-costs/

Overall a much better choice than starting from scratch.

That said, it wouldn't surprise me that the CEO hasn't already looked
into alternatives and been put off by the costs involved. (S)he is
trying to cheap their way through things by deluding themselves into a
its-not-that-big-a-problem way of thinking that I wouldn't involve
myself in that train wreck.

Call me a sceptic -- it's true. :)

HTH,

Emile
 
Ad

Advertisements

N

ngangsia akumbo

On 01/11/2014 09:14 PM, ngangsia akumbo wrote:



For an example of a commercially available entry level alternative costs

check out:

That said, it wouldn't surprise me that the CEO hasn't already looked

into alternatives and been put off by the costs involved. (S)he is

trying to cheap their way through things by deluding themselves into a

its-not-that-big-a-problem way of thinking that I wouldn't involve

myself in that train wreck.
Call me a sceptic -- it's true. :)


HAHAHAHAH, LOL THAT IS TRUE YOU SPOKE LIKE A MAGICIAN.

WHEN I START PUTTING THE CODE UP FOR STOCK/BOOKKEEPING
I WILL NEED YOUR ASSISTANCE.

THANKS
 
Ad

Advertisements

M

MRAB

If you currently do all your bills and things on paper, then this
job is going to be extremely daunting. Even if you don't write a
single line of code (ie you buy a ready-made system), you're going to
have to convert everybody to doing things the new way. In that case,
I would recommend getting some people together to discuss exactly
what you need to do, and then purchase an accounting, warehousing, or
inventory management system, based on what you actually need it to
do.

On the other hand, if it's already being done electronically, your
job is IMMENSELY easier. Easier, but more complex to describe,
because what you're really asking for is a program that will get
certain data out of your accounting/inventory management system and
display it. The difficulty of that job depends entirely on what
you're using for that data entry.
You should also consider whether you need to do it all at once or could
do it incrementally. Look at what functionality you might want and where
you might get the greatest benefit and start there. Doing it that way
will reduce the chances of you committing a lot of resources (time and
money) building a system, only to find at the end that you either left
something out or added something that you didn't really need after all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top