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

Respuesta :

Answer:

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)

Otras preguntas

ACCESS MORE
EDU ACCESS
Universidad de Mexico