Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use python and no break statements for ending loops please!!!!!!! thank you! READ THE ENTTRE DOCUMENT - There is one program to submit (thus

Please use python and no "break" statements for ending loops please!!!!!!! thank you! image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
READ THE ENTTRE DOCUMENT - There is one program to submit (thus one py file). Use the specificd name for your seript (shown in parentheses below). Solar Farm (solar_farm. py) An entrepreneur is looking into the financial considenations of building a solar farm (aka photovoltaic power station, or simply put: a field with a large number of solar panelsI). She has hired you to write a program that will help her play around with different configuntions of panels and get some immediate projections on the associated profits The prognam inputs are as follow: + Number of 280 watt solar panels (int). Validate user input (no negative values) + Number of 320 watt solar panels (int). Validate user inpet (no negative values) + Hours of daily sunlight in the location of the panels ( f loat). Validate user input (valuc must be between 0 and 24 , inclusive) + Number of weeks to compute the profit projections (int). Validate user input (no negative or rero values) She is able to sell the electricity at a rate of \$i. 19 per kilowatt-hour (profit). Set that nate as a constant (upperease) in your program. Use a bop to generate a table that displays the weck number and a running total of the amount of power produced (in units of kilowatt-houns). Once all weeks and the corresponding running totals have been displayed, outpur the total profit from the electricity for the specified duration (number of weeks). Take care to match the formatting shown in the below examples At the end of the program run, prompt the user to see if she wants to run another scenano, then repeat or quit accondingly. Hints: To calculate kilowatt-houn per day; kitowitt hours per doy =1000#panelswattsperpanddaityruntight(hrs) To format output in dollars with commas: profit=1225.08print(f)s[profit:,2f])>si,225.08 A few sample runs are shown below: Solar Farm Power Output Enter the number of 280 wate solar panels: 50 Enter the number of 320 watt solar panels: 75 Fnter the number of hours of sunlight the panels receive per day: 8 Enter the number of weeks to calculate the total power output: 4 Total protit over 4 weeka: $1,617.28 Would you 11ke to run another scenario? (y) a y Enter the number of 280 watt solar panels: 10 * Negative values not allowed. * Enter the number of 280 watt solar panelsi 100 Enter the nusber of 320 watt solar panela: 15 Znter the number of hours of sunilght the panel s receive per day: 12 Enter the number of meeks to calcuiate the total power output: 5 Total profit over 5 weeka: $2,617,44 Would you like to run another scenarioz. (y/A): A Thank you for uning the Solar Farm eower Qutput calculatort. 2 Requirements (not following will result in point deductions) - Use ennaras as needadl No mapic numben (caceps atere eapliciby apporad) Requirements (not following will result in point deductions) - Use constants as ncededl No magie numbers (exeept where explicitly approved)! - Refer to the PEP \& Sofk Gaide for Pyboon Cade PDF posted in Module 2 for style standarde - It is expected that you will complete the same process of development outlined in the textbook and videos. When you reach the point of having an algorithm (pseudocode), this will become the comments of your program and should become the starting point for writing code. Comment first, then write code! - Be sure to include a doestring at the top of the program that includes your name, class and a short description of the program. - Be sure all output is formatted. Unless othenwise specified, display float values with two digits: after the decimal point (ie, 2.43). - After Module 3, when inpur validaticn is specified, you must ase a loop (not an if statement)- - Your program output must exactly mateh what is provided in examples in this document for full credit (no modifications to output accepted). - Only programming concepts introduced thus far in this course are accepted. While there may be more efficient/degant solutions to a given problem, the expectation is that yoo practice the concepts presented. Once a concept is conered, you may use it for the remainder of the course - In CS 021, the use of break statements is not permitted. - Create a separate script (Python filc) for each program, with the filc nume as idcntificd abore Submit all files to the appropriate Blackboard dropbox (you mast attach all files before clicking 'submit')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions