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
Why I/O modules is needed between system bus<br>and I/O devices?​
beks73 [17]

Answer:

1. Processor communication -- this involves the following tasks:

<em>a. exchange of data between processor and I/O module</em>

<em>b. command decoding - I/O module accepts commands sent from the processor. E.g., the I/O module for a disk drive may accept the following commands from the processor: READ SECTOR, WRITE SECTOR, SEEK track, etc. </em>

<em>c. status reporting – The device must be able to report its status to the processor, e.g., disk drive busy, ready etc. Status reporting may also involve reporting various errors. </em>

<em>d. Address recognition – Each I/O device has a unique address and the I/O module must recognize this address. </em>

<em />

2. Device communication – The I/O module must be able to perform device communication such as status reporting.

3. Control & timing – The I/O module must be able to co-ordinate the flow of data between the internal resources (such as processor, memory) and external devices.

4. Data buffering – This is necessary as there is a speed mismatch between speed of data transfer between processor and memory and external devices. Data coming from the main memory are sent to an I/O module in a rapid burst. The data is buffered in the I/O module and then sent to the peripheral device at its rate.

5. Error detection – The I/O module must also be able to detect errors and report them to the processor. These errors may be mechanical errors (such as paper jam in a printer), or changes in the bit pattern of transmitted data. A common way of detecting such errors is by using parity bits.

5 0
3 years ago
Do you think EA sports should add more tape jobs to the game? (Game is nhl22)
wariber [46]

Answer:

yes

Explanation:

7 0
1 year ago
4.2.5 codehs text messages answer
N76 [4]

Answer:

public class TextMessage

{

   private String message;

   private String sender;

   private String receiver;

   

   public TextMessage(String from, String to, String theMessage)

   {

       sender = from;

       receiver = to;

       message = theMessage;

   }

   

   public String toString()

   {

       return sender + " texted " + receiver + ": " + message;

   }

}

4 0
2 years ago
Ways to ask for help effectively include
Step2247 [10]

Answer:

All of these choices

Explanation:

Clarity → the quality of being coherent and intelligible.

Sincerity → the quality of being free from pretense, deceit, or hypocrisy

Open mind → Open-mindedness is receptiveness to new ideas.

8 0
2 years ago
A file name extension provides what information about a file?
ASHA 777 [7]
In a file extension, it tells what type of file it is and tells what compiler to run the code.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which css property configures the capitalization of text?
    12·1 answer
  • True or False: You cannot change the default margin size for Word documents.  
    6·1 answer
  • How do you increase the amount of data in a sampled Google Analytics report?
    8·1 answer
  • When planning the structure of a spreadsheet, columns are for _______ items and rows are for _______ items.
    5·2 answers
  • Which of the following will print I'VE GOT THIS on the screen? (5 points)
    14·1 answer
  • Write an application that allows a user to input the height and width of a rectangle. It should output the area and perimeter of
    10·1 answer
  • Write a static method called split that takes an ArrayList of integer values as a parameter and that replaces each value in the
    12·1 answer
  • Does anyone have 2.19.4 Guess a number 2.0 code for codehs?
    8·1 answer
  • In the past, workers would usually complete ______. a. A variety of tasks on a daily basis b. The same tasks every day c. Thinki
    9·2 answers
  • How do you put text in MS publisher?<br><br> When do you use text wrapping?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!