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]
1 year 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]1 year 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
Describe 2 health risks posed by computers
iogann1982 [59]

Answer:

Bad posture and eye strain are two health risks posed by computers. Hand and wrist problems are other health risks posed by computers.

4 0
3 years ago
One item you will NOT need to provide when opening up a bank account
gladu [14]

Answer:

You don't need a birth certificate

Explanation:

8 0
2 years ago
Read 2 more answers
Write a program num2rome.cpp that converts a positive integer into the Roman number system. The Roman number system has digits I
Tom [10]

Answer:

Explanation:

#include <stdio.h>  

int main(void)  

{    

   int num, rem;

   printf("Enter a number: ");

   scanf("%d", &num);

   printf("Roman numerals: ");        

   while(num != 0)

   {

       if (num >= 1000)       // 1000 - m

       {

          printf("m");

          num -= 1000;

       }

       else if (num >= 900)   // 900 -  cm

       {

          printf("cm");

          num -= 900;

       }        

       else if (num >= 500)   // 500 - d

       {            

          printf("d");

          num -= 500;

       }

       else if (num >= 400)   // 400 -  cd

       {

          printf("cd");

          num -= 400;

       }

       else if (num >= 100)   // 100 - c

       {

          printf("c");

          num -= 100;                        

       }

       else if (num >= 90)    // 90 - xc

       {

          printf("xc");

          num -= 90;                                              

       }

       else if (num >= 50)    // 50 - l

       {

          printf("l");

          num -= 50;                                                                      

       }

       else if (num >= 40)    // 40 - xl

       {

          printf("xl");            

          num -= 40;

       }

       else if (num >= 10)    // 10 - x

       {

          printf("x");

          num -= 10;            

       }

       else if (num >= 9)     // 9 - ix

       {

          printf("ix");

          num -= 9;                          

       }

       else if (num >= 5)     // 5 - v

       {

          printf("v");

          num -= 5;                                      

       }

       else if (num >= 4)     // 4 - iv

       {

          printf("iv");

          num -= 4;                                                            

       }

       else if (num >= 1)     // 1 - i

       {

          printf("i");

          num -= 1;                                                                                    

       }

   }

   return 0;

}

8 0
2 years ago
Write a program that takes an integer n as a parameter and sums all of the multiples of 2 or 5 from 1 to n. For example, if n =
Alex

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variable

int num;

int tot_sum=0;

cout<<"enter a number: ";

// read the value of n

cin>>num;

// check the multiple of 2 or 5 from 1 to n

for(int x=1;x<=num;x++)

{

// if multiple of 2 or 5 then add them

   if(x%2==0 ||x%5==0)

   {

       tot_sum=tot_sum+x;

   }

}

// print the sum

cout<<"sum of multiple of 2 or 5 is:"<<tot_sum<<endl;

return 0;

}

Explanation:

Read the number "n" from user.Check every number from 1 to n, if it is a multiple of 2 or 5 then add them to "tot_sum".When the for loop end, "tot_sum" will have sum of all the number which are either multiple of 2 or 5.Print the sum.

Output:

enter a number:11

sum of multiple of 2 or 5 is:35

4 0
2 years ago
How is it possible for the router to know whether it is supposed to send a cat photo to your laptop
kupik [55]

It is possible for the router to know whether it is supposed to send a cat photo to your laptop because  It uses the private IP address.

Router  is a  device that help to transfer data and across the internet or across the user device and the internet.

Private IP addresses are internet protocol addresses that is often  assign to user device by   router in order to a successful communicate to take place between the internet and user device.

Private IP addresses are mostly at:

•Home

•Office

•Business  environments

Inconclusion It is possible for the router to know whether it is supposed to send a cat photo to your laptop because  It uses the private IP address.

Learn more here:

brainly.com/question/19112414

3 0
1 year ago
Other questions:
  • The problem of using IP numbers for addressing hosts in the Internet are resolved using
    5·1 answer
  • At an uncontrolled intersection, you should yield to the car on the right. True or false.
    10·2 answers
  • PLZZZ HELP 30 POINTS!!
    14·1 answer
  • After a suspected identity fraud case has been resolved, you should:
    10·2 answers
  • What data discovery process, whereby objects are categorized into predetermined groups, is used in text mining?
    9·1 answer
  • Random Walker Collisions In lecture, we saw how to model the behavior of a random walker on a 2D grid using a Monte Carlo simula
    8·1 answer
  • Computer can do work very___​
    7·2 answers
  • Which are examples of types of audio media that can support a presentation? Check all that apply.
    14·2 answers
  • A host is on the 192.168.146.0 network that has a subnet mask of 255.255.255.0. The binary value of the host portion is 11010101
    8·1 answer
  • How you use ict today and how will you use it tomorrow
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!