Ask Question
9 January, 14:59

Make sure the file HouseSign. py is selected and open. 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). Write the rest of the program using assignment statements and if statements as appropriate. The output statements are written for you. Execute the program by clicking the Run button at the bottom of the screen. Your output should be: The charge for this sign is $82.0. g

+1
Answers (1)
  1. 9 January, 18:38
    0
    The code script is explained below

    Explanation:

    Code:

    # assigning variables to given values

    numChar = 8

    charge = 0.00

    color = 'gold'

    woodType = 'oak'

    # check if number of characters is greater than 5, add $4 for every extra character

    if numChar > 5: charge + = (numChar - 5) * 4

    # if wood is of oak add charge by 20

    if woodType is 'oak': charge + = 20

    # if coloring is gold then add charge by 15

    if color is 'gold': charge + = 15

    # add charge by 35 as minimum charge

    charge + = 35

    #orint the charge to screen

    print ("The charge for this sign is $%.1f" %charge)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Make sure the file HouseSign. py is selected and open. You need to assign variables for the following: A variable for the cost of the sign ...” in 📙 Engineering if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers