Computers and Technology

Understanding if Statements (brushing up on earlier assignments I didn't do too well on) Summary:
In this lab, you complete a prewritten Python program for a carpenter who creates personalized house signs. The program is supposed to compute the price of any sign a customer orders, based on the following facts:
The charge for all signs is a minimum of $35.00.
The first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character.
If the sign is make of oak, add $20.00. No charge is added for pine.
Black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering.
Instructions:
1. Make sure the file HouseSign. py is selected and open.
2. You need to assign variables for the following:
-A variable for the cost of the sign assigned to 0.00 (charge).
-A variable for the number of characters assigned to 8 (numChars).
-A variable for the color of the characters assigned to "gold" (color).
-A variable for the wood type assigned to "oak" (woodType).
3. Write the rest of the program using assignment statements and if statements as appropriate. The output statements are written for you.
4. Execute the program by clicking the "Run Code" button at the bottom of the screen. Your output should be: The charge for this sign is $82.0.
Assignment (HouseSign. py)- here's my code, not sure what I'm doing wrong but I'm only getting 50% passed:
numChars = int(input('8'))
color = input("gold")
woodType = input("oak")
if numChars == 8:
charsCharge = numChars - 5 * 4
if color == "gold":
colorCharge = 15
if woodType == "oak":
woodCharge = 20
print("The charge for this sign is $" + str("82"))

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, paigesyring
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
image
Computers and Technology, 22.06.2019 14:40, coryowens44
For this assignment you have to write a c program that will take an infix expression as input and display the postfix expression of the input. after converting to the postfix expression, the program should evaluate the expression from the postfix and display the result. what should you submit? write all the code in a single file and upload the .c file. compliance with rules: ucf golden rules apply towards this assignment and submission. assignment rules mentioned in syllabus, are also applied in this submission. the ta and instructor can call any students for explaining any part of the code in order to better assess your authorship and for further clarification if needed. problem: we as humans write math expression in infix notation, e. g. 5 + 2 (the operators are written in-between the operands). in computer's language, however, it is preferred to have the operators on the right side of the operands, ie. 5 2 +. for more complex expressions that include parenthesis and multiple operators, a compiler has to convert the expression into postfix first and then evaluate the resulting postfix write a program that takes an "infix" expression as input, uses stacks to convert it into postfix expression, and finally evaluates it. it must support the following operations: + - / * ^ % ( example infix expression: (7-3)/(2+2) postfix expression: 7 3 2 2 result: rubric: 1) if code does not compile in eustis server: 0. 2) checking the balance of the parenthesis: 2 points 3) incorrect postfix expression per test case: -2 points 4) correct postfix but incorrect evaluation per test case: -i points 5) handling single digit inputs: maximum 11 points 6) handling two-digit inputs: 100 percent (if pass all test cases)
Answers: 3
image
Computers and Technology, 22.06.2019 22:40, ihatemylife0
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
image
Computers and Technology, 23.06.2019 03:30, bellsbella34
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
Do you know the correct answer?
Understanding if Statements (brushing up on earlier assignments I didn't do too well on) Summary:<...

Questions in other subjects:

Konu
English, 15.04.2020 22:54
Konu
Mathematics, 15.04.2020 22:54