# Need Help With Python Coding

Page 1 of 1

## 4 Replies - 1581 Views - Last Post: 08 December 2009 - 10:21 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=143969&amp;s=9dd82463dad2334a4d2ed56a5103a025&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 MGOBLUE021

Reputation: -3
• Posts: 13
• Joined: 07-December 09

# Need Help With Python Coding

Posted 07 December 2009 - 08:34 AM

I just need someone's help starting out this code in Python. Any help would be greatly appreciated!

A global garbage company wants you to design and write a program that will do the following things:
• Take in the name of a client
• Take in how much tons of garbage was collected for each month
• Calculate the yearly average of garbage for that client
• Determine the cost associated with the yearly average based on the following:
o If the average is between 0 and 20 ton, then the cost per ton is 4,500.
o If the average is between 21 and 50 ton, then the cost per ton is 5,500.
o If the average is between 51 and 100 ton, then the cost per ton is 6,500.
o If the average is above 100 ton, then the cost per ton is 7,000.
• Display the name of the company, the total tons of garbage collected, the average tonnage of garbage, and the total cost it will incur for that landfill.

This program should use loops, including one to run the program multiple times. It will also use decisions and modules/functions. Be sure to include input validation.

Is This A Good Question/Topic? 0

## Replies To: Need Help With Python Coding

### #2 chemicalfan

Reputation: 4
• Posts: 88
• Joined: 16-October 09

## Re: Need Help With Python Coding

Posted 07 December 2009 - 05:09 PM

Ok, so what do you have so far?

### #3 MGOBLUE021

Reputation: -3
• Posts: 13
• Joined: 07-December 09

## Re: Need Help With Python Coding

Posted 08 December 2009 - 01:02 PM

chemicalfan, on 7 Dec, 2009 - 04:09 PM, said:

Ok, so what do you have so far?

I don't have anything yet. I was just wondering if I could get some help starting it out or something...
Thanks!

• Saucy!

Reputation: 6152
• Posts: 23,776
• Joined: 23-August 08

## Re: Need Help With Python Coding

Posted 08 December 2009 - 04:46 PM

That's not how it works here. You need to show some effort. Please re-read our policy:

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Thank you for helping us helping you.

### #5 Lemur

• Pragmatism over Dogma

Reputation: 1389
• Posts: 3,527
• Joined: 28-November 09

## Re: Need Help With Python Coding

Posted 08 December 2009 - 10:21 PM

Tell you what, because you seem like you really have some potential there to do something with this project and you just need some code to start you out I have the perfect site for all of your problems, it helped me learn everything I know as well as most of the coders here. This site is the most useful thing ever:
http://lmgtfy.com/?q=Python+Primer