21 Aug Programming
- Q1 Sequential coding: @ 50 points = 25 + 25
Scenario: A client wants an estimate from her painter of the cost to paint one exterior wall of her condo. The wall is 20 ft long and 10 feet high. The painter says the paint she wants will cost $25 per gallon and each gallon will cover 125 ft**2. What would be his estimate for this job ? As part of his estimate he will print out how many gallons needed ( fractions are acceptable), as well as the total cost.
A) Pseudocode @25 pts:Write apseudo code solution to this question that includes the following:
a) a module for variable initialization
b) a module that does the required calculation
c) a module that outputs the result ( a print in this case)
(Note: a ‘module’ here simply means a list of variables
Keep in mind that you will need to give your variables ‘domain’ terminology names. That is, make your names transparent to your client, like translating 20 ft long into a pseudocode variable like:
length = 20 ft , alternatively, you might also say ‘wallLength’ = 20 ft
( also include the correct units for your variables as above)B) PyCode @25 pts:Write the Python code to effect this task using the variables you constructed in partA.
Cut and paste in the code and your results into your word doc.
Include the variable units in a comment following the variable
e.g, length = 20 #ft
Run your Python code and cut and paste your code and your results into the word document. - TODO: The filepicker assumes it is inside a list.. faking it out but maybe we should actually be inside another tag (datacollection?) even though we can’t use that here depending on how we’re invoked
- Attach File
50 points
QUESTION 2
- Scenario: Jo expects her store to increase its profits by 56% next year.Currently Jo has 10000 in profit
a. Write the algebraic ( that is, without numbers) equation to express her total end of year profit. Use appropriate domain terminology to create your variables. Think Domain Driven Design!
b. write the algebraic Python equation using the variables of part a. Note I am not asking you to run the code but just to write down the equation(s)
c. write the numeric result of the total end of year profit, show the numeric equation
15 points
QUESTION 3
- Scenario:
Place parentheses to indicate precedence and grouping.
a. A/B/C*D+C
b. A/B^3*4 /D
c. A ^ 3 ^ 2 * 5
15 points
QUESTION 4
- Given the api of a module Calc(X, Y) where part of the api says that X, Y must be numeric.
Explain the difference between X, Y and a, b in their usage ? How would you characterize these variables and why?
a = 10
b = 30
Calc( a, b)
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Wridemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
