Anyone good at coding(python)?
Comments
-
Need to Download
It's a .txt file
http://www.mediafire.com/view/?zge5bp6p7mayhy6
Task
Write a program that will perform 2 main tasks
1. Prompt the user for a start and end date and produce a report on file showing (i)
the total sales for the period between the two dates and (ii) a (horizontal)
histogram of daily sales on a monthly basis.
For example:
2008.03
01:************
02:**********************
03:*****************
04:*********
05:***************************
|
|
|
28:****************
29:***********
30:*************************
2008.04
01:******
02:********************
03:**************
etc.
Total sales for the period 2008.03.22 to 2008.06.30 =
$234296.45
N.B. that one asterisk (*) should represent $100
2. Write the output to a file.
3. Make sure that you validate the user’s input data. (dates out of range and start date
after end date?)
Instructions (Kinda)
1. Use a standard file-reading loop to read successive lines from the file. [In Python
this is a for loop.]
2. Use split() to break up the lines; use the commas as delimiters
3. Check each line that you read in to see if the year is >= the starting year of yr.
range
Then check to see if the month is >= the starting month of yr. range
Then check to see if the day is >= the starting day of yr. range
When all three things are true set a variable like beginPrint to true
4. Now check each line that you read to see if the current day is > the ending day of
yr range
Then check to see if the month is EQUAL to the ending month of yr. range
Then check to see if the year is EQUAL to the ending year of yr. range
When all three things are true set a variable like stopPrint to true
5. If beginPrint is true and stopPrint is not true
Then output the current line of sales
6. Since the output requires that you print out the month every time you get a new
month, you will need to track the current month, compare it to the month you’re
reading and change it when the current month is no longer equal to the month
you’re reading
7. If you have a new month and beginPrint is true and stopPrint is not true
Then print a new month -
Need to Download
It's a .txt file
http://www.mediafire.com/view/?zge5bp6p7mayhy6
Task
Write a program that will perform 2 main tasks
1. Prompt the user for a start and end date and produce a report on file showing (i)
the total sales for the period between the two dates and (ii) a (horizontal)
histogram of daily sales on a monthly basis.
For example:
2008.03
01:************
02:**********************
03:*****************
04:*********
05:***************************
|
|
|
28:****************
29:***********
30:*************************
2008.04
01:******
02:********************
03:**************
etc.
Total sales for the period 2008.03.22 to 2008.06.30 =
$234296.45
N.B. that one asterisk (*) should represent $100
2. Write the output to a file.
3. Make sure that you validate the user’s input data. (dates out of range and start date
after end date?)
Instructions (Kinda)
1. Use a standard file-reading loop to read successive lines from the file. [In Python
this is a for loop.]
2. Use split() to break up the lines; use the commas as delimiters
3. Check each line that you read in to see if the year is >= the starting year of yr.
range
Then check to see if the month is >= the starting month of yr. range
Then check to see if the day is >= the starting day of yr. range
When all three things are true set a variable like beginPrint to true
4. Now check each line that you read to see if the current day is > the ending day of
yr range
Then check to see if the month is EQUAL to the ending month of yr. range
Then check to see if the year is EQUAL to the ending year of yr. range
When all three things are true set a variable like stopPrint to true
5. If beginPrint is true and stopPrint is not true
Then output the current line of sales
6. Since the output requires that you print out the month every time you get a new
month, you will need to track the current month, compare it to the month you’re
reading and change it when the current month is no longer equal to the month
you’re reading
7. If you have a new month and beginPrint is true and stopPrint is not true
Then print a new monthHelp me plox
wait for a moment, you're asking people to write for you a program in python.
Instead of learning python and trying it your self?
Really what is the point of following a computer science class if you're letting other people do your job?
You'll never learn anything this way.
Good luck: http://www.learnpython.org/ -
SamuraiMoMo wrote: »wait for a moment, you're asking people to write for you a program in python.
Instead of learning python and trying it your self?
Really what is the point of following a computer science class if you're letting other people do your job?
You'll never learn anything this way.
Good luck: http://www.learnpython.org/
How am I going to do it when I absolutely don't know how lol. I'm just asking for help.and what strings I should use for the main functions for the program. -
How am I going to do it when I absolutely don't know how lol. I'm just asking for help.and what strings I should use for the main functions for the program.
So learn the basics follow tutorials etc.
All I see from your post is asking people to write for you a program and you will than reward them with a game
There are really allot of tutorials even video's on youtube of people teaching python just follow those tutorials.....
Also ask your teacher if he could help.
Just saying mate not trying to attack u or something if you really wanna learn something about python you should do it and not ask other people to do it.
On coding forums is were you can really get help but you need provide a basic code of your work your self or just ask on how to do such a thing the will than post tutorials on what and how.
But don't expect for people to give you a whole code of something and tell you just copy and past this xD -
SamuraiMoMo wrote: »So learn the basics follow tutorials etc.
All I see from your post is asking people to write for you a program and you will than reward them with a game
There are really allot of tutorials even video's on youtube of people teaching python just follow those tutorials.....
Also ask your teacher if he could help.
Just saying mate not trying to attack u or something if you really wanna learn something about python you should do it and not ask other people to do it.
P.s On coding forums is were you can really get help but you need provide a basic code of your work your self or just ask on how to do such a thing the will than post tutorials on what and how.
I did, don't worry. The other thing is, I already searched up some tutorials, but it doesn't show me what I nerd to know. -
I did, don't worry. The other thing is, I already searched up some tutorials, but it doesn't show me what I nerd to know.
Try asking here: http://www.dreamincode.net/forums/forum/29-python/
dreamincode has allot of helpful people to learn basically any coding language -
grovalmitch1 wrote: »
This is a REALLY old post, how did you even find it?! Anyway, please do not bump old threads. Thank you!
This discussion has been closed.
Categories
- All Categories
- Z8Games
- 1 Z8 Forum Discussion & Suggestions
- 15 Z8Games Announcements
- Rules & Conduct
- 2.5K CrossFire
- 709 CrossFire Announcements
- 712 Previous Announcements
- 2 Previous Patch Notes
- 320 Community
- 12 Modes
- 392 Suggestions
- 16 Clan Discussion and Recruitment
- 73 CF Competitive Forum
- 1 CFCL
- 16 Looking for a Team?
- 522 CrossFire Support
- 7 Suggestion
- 15 CrossFire Guides
- 35 CrossFire Off Topic