Hey,
So i am completely new to python. I am taking a course at school by distance and i am unable to get the help/explanation to complete...or really start, my assignment.
I am supposed to make a working chequebook calculator. It will store cheques (the cheque number, the amount and description). I have the html page, 2 .py files, a module and a .data file. Here is a link to the assignment: http://www.cs.sfu.ca/CC/165/popowich/assign-1/assign4
and here is the link to what i need to make:
http://cmpt165.cs.sfu.ca/~ggbaker/examples/chequebook.html
I have been able to make the password work and that is all. What i dont understand is how all the files fit together.
For example. i am supposed to create a module called chequeslib.py and within this module i import pickle and a file called cheques.data. From what i understand a data file hold static information. So i am guessing this file holds the information that the user inputs and saves? But how do i get this information here? My .py files are linked to the html via form and my chequeslib.py is a module for use in the further 2 .py files? I guess the first step for me is to understand how these 5 files communicate.
Could someone explain the flow of information?
for example, user inputs cheque info. Where does this info go? Does it go to the.py file and then that file sends it to my .data file?
I am in utter desperation and i have no clue how to even start this assignment. Any help or guidance would be great. Please remember i am not a computer science student so please speak in simple terms...
Any help is greatly appreciated (hope what i said makes some sense and hope the links work).
Thanks again!

Mmkay. The first step is determining what your input and output are. I believe the input is the cheques.data file, and your output is the XHTML that looks something like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
<head> 
<title>All Cheques</title> 
<style type="text/css"> 
td.amount {
  text-align: right;
}
</style> 
</head> 
<body> 
<h1>All Cheques</h1> 
 
<table> 
<thead> 
<tr><th scope="col">Number</th><th scope="col">Amount</th><th scope="col">Description</th></tr> 
</thead> 
<tbody> 
    
<tr><th scope="row">0</th><td class="amount">$250</td><td>balance</td></tr> 
<tr><th scope="row">1</th><td class="amount">$-12.34</td><td>chips &amp; gum</td></tr> 
<tr><th scope="row">2</th><td class="amount">$-345.12</td><td>dentist</td></tr> 
<tr><th scope="row">Total</th><td class="amount">$-107.46</td></tr> 
</tbody></table> 
 
<hr class="footsep" /> 
<p class="footlink">Return to <a href="./">the index</a>.</p> 
</body> 
</html>

Yay! But seriously read the assignment, they have good examples. And it says prominently that you don't have to write chequelib.py it's already done for you. Just download. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.