1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
serg [7]
2 years ago
13

In this lab, you complete a prewritten Python program for a carpenter who creates personalized house signs. The program is suppo

sed 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
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.
Computers and Technology
1 answer:
ivolga24 [154]2 years ago
5 0

Using the computer language in python to write a function code that personalized house signs

<h3>Writting the code in python:</h3>

<em>#Assign varibles</em>

<em>charge = 0.00</em>

<em>numChars = 8</em>

<em>color = "gold"</em>

<em>woodType = "oak"</em>

<em />

<em>#Checking for number of characters</em>

<em>if numChars > 5:</em>

<em>charge = 35 + (numChars-5)*4</em>

<em>elif numChars > 0:</em>

<em>charge = 35</em>

<em />

<em>#Checking wood type</em>

<em>if woodType == "oak":</em>

<em>charge += 20</em>

<em />

<em>#Checking for color</em>

<em>if color == "gold":</em>

<em>charge += 15</em>

<em />

<em>#Print output</em>

<em>print("The charge for this sign is $"+str(charge)+".")</em>

See more about python at brainly.com/question/13437928

#SPJ1

You might be interested in
Untuk memberikan keterangan pada bagian bawah halaman dokumen yg akan diulangi pada setiap halaman dokumen yg digunakan fasilita
lisabon 2012 [21]
Fasilitas yg di gunakan adalah footer
5 0
3 years ago
Read 2 more answers
Which command can be used to connect to a remote windows share called data on the server called fileserver?
DiKsa [7]

c. c.) smbclient //fileserver/data

7 0
3 years ago
A = 250; B = 325. which of the following statements is true? A ==B A&gt;B A =B
Ivanshal [37]

Answer:

lollol

Explanation:

7 0
3 years ago
What is the Slide Sorter View used for?
bonufazy [111]

Answer:

b. bc u can delete and add slides in ur presentation

3 0
3 years ago
Read 2 more answers
The blue bar across the top of the screen informs you of the Screen Title, or what step you are on.
xeze [42]

Answer:

true

Explanation:

5 0
3 years ago
Other questions:
  • Given a string variable named sentence that has been initialized , write an expression whose value is the the very last characte
    14·1 answer
  • Write a function with two parameters, prefix (a string, using the string class from ) and levels (an unsigned integer). The func
    14·1 answer
  • Where would you look to see how much space is available on your c drive?
    8·1 answer
  • Ross has to create a presentation for his class but can't decide on a topic. What should he do?
    9·2 answers
  • Which of the following is true regarding a class and interface types? Group of answer choices You can convert from a class type
    9·1 answer
  • Which term describes the second core IPSec security protocol; it can perform authentication to provide integrity protection, alt
    13·1 answer
  • Explain why the cosmic horizon is much smaller than the universe itself
    9·1 answer
  • Select the correct answer.
    9·1 answer
  • 4. What is the package name in which the Scanner class resides?
    14·1 answer
  • It is where your cpu (processor) is installed
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!