Write Python code for the following programming problem below.  Last year, a local college implemented rooftop gardens as a way to promote energy efficiency and save money. Write a program that will allow the user to enter the energy bills from January to December for the year prior to going green. Next, allow the user to enter the energy bills from January to December of the past year after going green. The program should calculate the energy difference from the two years and display the two years worth of data, along with the savings. Hints: Create three arrays of size 12 each. The first array will store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference. Also, create a string array that stores the month names. These variables might be defined as follows: notGreenCost = [0] * 12 goneGreenCost = [0] * 12 savings = [0] * 12 months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] Your sample output might look as follows: Enter NOT GREEN energy costs for January Enter now -->789 Enter NOT GREEN energy costs for February Enter now -->790 Enter NOT GREEN energy costs for March Enter now -->890 Enter NOT GREEN energy costs for April Enter now -->773 Enter NOT GREEN energy costs for May Enter now -->723 Enter NOT GREEN energy costs for June Enter now -->759 Enter NOT GREEN energy costs for July Enter now -->690 Enter NOT GREEN energy costs for August Enter now -->681 Enter NOT GREEN energy costs for September Enter now -->782 Enter NOT GREEN energy costs for October Enter now -->791 Enter NOT GREEN energy costs for November Enter now -->898 Enter NOT GREEN energy costs for December Enter now -->923 ------------------------------------------------- Enter GONE GREEN energy costs for January Enter now -->546 Enter GONE GREEN energy costs for February Enter now -->536 Enter GONE GREEN energy costs for March Enter now -->519 Enter GONE GREEN energy costs for April Enter now -->493 Enter GONE GREEN energy costs for May Enter now -->472 Enter GONE GREEN energy costs for June Enter now -->432 Enter GONE GREEN energy costs for July Enter now -->347 Enter GONE GREEN energy costs for August Enter now -->318 Enter GONE GREEN energy costs for September Enter now -->453 Enter GONE GREEN energy costs for October Enter now -->489 Enter GONE GREEN energy costs for November Enter now -->439 Enter GONE GREEN energy costs for December Enter now -->516 -------------------------------------------------

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write Python code for the following programming problem below. 

Last year, a local college implemented rooftop gardens as a way to promote energy efficiency and save money. Write a program that will allow the user to enter the energy bills from January to December for the year prior to going green. Next, allow the user to enter the energy bills from January to December of the past year after going green. The program should calculate the energy difference from the two years and display the two years worth of data, along with the savings.

Hints: Create three arrays of size 12 each. The first array will store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference. Also, create a string array that stores the month names. These variables might be defined as follows:

notGreenCost = [0] * 12

goneGreenCost = [0] * 12

savings = [0] * 12

months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']

Your sample output might look as follows:

Enter NOT GREEN energy costs for January

Enter now -->789

Enter NOT GREEN energy costs for February

Enter now -->790

Enter NOT GREEN energy costs for March

Enter now -->890

Enter NOT GREEN energy costs for April

Enter now -->773

Enter NOT GREEN energy costs for May

Enter now -->723

Enter NOT GREEN energy costs for June

Enter now -->759

Enter NOT GREEN energy costs for July

Enter now -->690

Enter NOT GREEN energy costs for August

Enter now -->681

Enter NOT GREEN energy costs for September

Enter now -->782

Enter NOT GREEN energy costs for October

Enter now -->791

Enter NOT GREEN energy costs for November

Enter now -->898

Enter NOT GREEN energy costs for December

Enter now -->923

------------------------------------------------- Enter GONE GREEN energy costs for January Enter now -->546 Enter GONE GREEN energy costs for February Enter now -->536 Enter GONE GREEN energy costs for March Enter now -->519 Enter GONE GREEN energy costs for April Enter now -->493 Enter GONE GREEN energy costs for May Enter now -->472 Enter GONE GREEN energy costs for June Enter now -->432 Enter GONE GREEN energy costs for July Enter now -->347 Enter GONE GREEN energy costs for August Enter now -->318 Enter GONE GREEN energy costs for September Enter now -->453 Enter GONE GREEN energy costs for October Enter now -->489 Enter GONE GREEN energy costs for November Enter now -->439 Enter GONE GREEN energy costs for December Enter now -->516 ------------------------------------------------- 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Create three arrays of size 12 each. The first array will store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference. Also, create a string array that stores the month names.

 

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education