A friend a just opened his own barber shop and has asked you to develop a program to track the type of service the customer is receiving and the cost for the service and also include any tips the customer may give to the barber. The name of your friend's barber shop is Big Al's and on each customer receipt he wants to display the name of his shop, customer name, the type of service, cost of the service, and the amount of the tip for a total price of the service rendered. Name your variables Declare your variables

Answers

Answer 1

Answer:

class Barber(object):

   barber_shop = "Big AI's barber shop"

   def __init__(self, customer_name, type_of_service=[], tip=0):

       self.cust_name = customer_name

       self.tos = type_of_service

       self.tip = tip

   def service_type(self, *args):

       for i in args:

           self.tos.append(i)

   def total(self):

       

       services = {'trimming':10, 'hair_cut':20, 'shaving':15, 'washing':5, 'dyeing':5}

       contain = ''

       total = 0

       for service in self.tos:

           if service in services.keys():

               total += services[service]

               contain += f'{service}: {services[service]}\n'

       

       print(self.barber_shop,'\n', self.cust_name,'\n', 'Services:',contain.splitlines(),'\n', \

           f'total: ${total}', '\n',f'Tip: ${self.tip}')

mycust = Barber('John',['washing'],6 )

mycust.service_type('shaving', 'dyeing')

mycust.total()

Explanation:

The Barber class is a blueprint used to create an object instance of customers that visits the barber-shop. It has two methods 'service_type' and 'total' which are just defined functions of the class that appends services to the type of service variable and total that prints the total cost of services on the screen.


Related Questions

Write the line of code to calculate the area of a circle with radius 3 and store it in a variable called
area.

Answers

Answer:

area = 2.14 * 3 ** 2

Explanation:

No clue what language you use but this should be pretty universal. To find the area of a circle you use pi(r) ^ 2 or pi times radius squared

[tex]\pi r^{2}[/tex]

In python it looks like this:

>>> area = 3.14 * 3 ** 2

>>> print(area)

28.26 <Printed text

alexa it is olewi.............................................

Answers

Answer:

jvksvksdvkbvkjsdkcn

Explanation:

Huh.........whattttt

Which of the following is an example of a tax?

cash payment,medicare,rental payment,line of credit

Answers

Medicare because it’s like insurance

Do you think the fact that the cyclist has raised nearly half a billion dollars for a cancer foundation makes what he did any less immoral? Should his sponsors have considered this fact before pulling their contracts with him? Explain your answers.

Answers

Answer:

1. No, I do not think that the fact that the cyclist raised nearly half a billion dollars for a cancer foundation made what he did less immoral.

2. No. The sponsors were right in not considering this fact before pulling their contracts with him.

(Find the Explanations below)

Explanation:

Lance Armstrong is a Cyclist who suffered cancer at the young age of twenty. He survived the ordeal and went ahead to form a foundation known as the Livestrong Foundation which helped cancer patients obtain medical help. He was accused of doping by the United States Anti-doping agency. This led to the withdrawal of sponsorships by several organizations.

1. The fact that the cyclist fought a good cause by raising millions of dollars to fight cancer, does not make what he did any less immoral because it was his fame and the supposed integrity that he possessed that first attracted the recognition and sponsorships to him. Engaging in an illegal act to win his games and stay on top was morally wrong and it corrupted the trust that was placed in him. His career as a cyclist was the base that gave him his voice.

2. The sponsors should not have considered the fact that he raised a lot of money for the cancer cause because the wrong act of engaging in doping was morally wrong, and if the spnsors remained with him, it would be as if they supported this act. Not withdrawing their sponsorships, would also tarnish the image of the organizations.

Question # 4
Multiple Choice
How do you stop a program that is stuck in an infinite loop?

Press the Alt key together with the Q key.

Press the Control key together with the C key.

Press the Control key together with the Q key.

Press the Alt key together with the C key.

Answers

Answer:Control +c

Explanation:yes

Answer: Press the Control key together with the C key.

Explanation: Correct on Edg 2020/2021.

Instructions
Write a program that will add up the series of numbers: 99, 98, 97… 3, 2, 1. The program should print the running total as well as the total at the end. The program should use one for loop, the range() function and one print() command.

Sample Run
99

197

294

390







4940

4944

4947

4949

4950

Answers

total = 0

for x in range(99, 0, -1):

   total += x

   print(total)

I hope this helps!

SOMEONE PLEASE HELP ME WITH THIS !!!!

Answers

I feel it is C, but I am not sure if it is correct, I can only apologize if it is wrong.

True or False? You should never move an injured person.
True
False

Answers

Answer:

true

Explanation:

, , ,g d,t ,dt m,dt ymtd

Answers

Answer:ummm me confused

Explanation:

Use of the Internet for e-government has increased. Identify the benefits by checking all of the boxes that apply.
A. It keeps the public informed about events
B. People do not have to vote
C. People can pay bills
D. People do not have to visit the site
E. The government can share important information about issues with the people in that town.

Answers

It’s A my good guy have a great day

Answer:

the answer is A C and E

Explanation:

(Java) Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85.

import java.util.Scanner;
class Eggs {
public static void main(String[] args) {
// Write your code here

}
}​

Answers

import java.util.Scanner;

public class Eggs {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("How many eggs?");

       int eggs = scan.nextInt();

       int dozens = eggs / 12, ind = eggs - (dozens*12);

       

       System.out.println("You ordered "+eggs+" eggs. That's "+dozens+" at $3.25 per dozen and "+ind+" loose eggs at 45 cents each for a total of $"+((dozens*3.25)+(ind*0.45))+".");

   }

   

}

I hope this helps!

In this exercise we have to use the knowledge of the JAVA language to write the code, so we have to:

The code is in the attached photo.

So to make it easier the JAVA code can be found at:

import java.util.Scanner;

public class Eggs {

  public static void main(String[] args) {

      Scanner scan = new Scanner(System.in);

      System.out.println("How many eggs?");

      int eggs = scan.nextInt();

      int dozens = eggs / 12, ind = eggs - (dozens*12);

System.out.println("You ordered "+eggs+" eggs. That's "+dozens+" at $3.25 per dozen and "+ind+" loose eggs at 45 cents each for a total of $"+((dozens*3.25)+(ind*0.45))+".");

  }

}

See more about JAVA at brainly.com/question/2266606

Write a program that reads two integers, checks if a digit repeats 3 times in a row in the first integer and that same digit repeats two times in a row in the second integer.

Answers

Answer:

first_num = input("Enter integer digits (should be four or more digits): ")

sec_num = input("Enter integer digits (should be four or more digits): ")

num = '3'

if

def count_check( digit):

   if (digit * 3) in first_num and (digit * 2) in sec_num:

       print(True)

   else:

       print(False)

count_check(num)

Explanation:

The python source code above receives two values assigned to variables "first_num" and "sec_num" and defines a function called count_check to check if a digit occurs three consecutive times in the first input and two in the second to print a value of true or false otherwise.

Identify way computer are used in television production​

Answers

Answer:

image editing, text om screen, weather graphics, animation, sattelites ... a lot more possibilites are endless just limited

What is the advantage of using the Publish Online option for sharing a calendar? It creates a web version that can be viewed by anyone. It allows an employee's boss to see busy/free information. It allows a user inside an organization to view the calendar. It allows a user outside an organization to view the calendar.

Answers

Answer:

its D. it allows a user outside an organization to view the calendar.

Explanation:

i just got it right on edge 2020.

Answer:

B

Explanation:

Arrange the numbers 4, 8, 2, 6, 3, 5, 0, 1 into ascending order using the Merge sort algorithm

Answers

Answer:

1 2 3 4 5 6 you are missing seven the 8

Explanation:

25 POINTS. Which three features are related to the functions of a continuous rotation servo motor?
A. The command signal sets the direction and speed of rotation.
B. It can change the shaft's movement from circular to forward or backward motion.
C. It is commonly used for radar navigation on robots.
D. The motor can turn either clockwise or counterclockwise with no limits.
E. There are barriers in the design that prevent rotation beyond a half circle.

Answers

I think A I’m not too sure though! Try looking it up cause I’m not sure about my answer

I need the answer to life. I cant live without my POGCHAMPS!

Answers

Answer:

Pray to God and ask him for help in life. May God bless you

Explanation:

Answer:

Pog

Explanation:

Poggers

//TO-DO: Fill in the Authors Name Here//TO-DO: Fill in the current date here//CS1428 Lab//Lab 10//Description: this program will find letter grades from 5 number grades#include using namespace std;double getAverage(double g[], const int SIZE){ double total = 0; for(int i = 0; i < SIZE; i++) { total += g[i]; } return total / SIZE;}void getGrades(double g[], const int SIZE){ cout << "Please enter 5 grades:" << endl; for(int i = 0; i < SIZE; i++) { cin >> g[i]; }}// TODO: Complete function definitionsint main(){ const int SIZE = 5; double grades[SIZE], average; int numberOfAs = 0, numberOfBs = 0, numberOfCs = 0, numberOfDs = 0, numberOfFs = 0; //TODO: Add function calls return 0;}

Answers

Answer:

countLetterGrades:

void countLetterGrades(double grades[], const int SIZE, int &numberOfAs,int &numberOfBs,int &numberOfCs,int &numberOfDs,int &numberOfFs) {

for(int i = 0; i < SIZE; i++){

if(grades[i]>85){numberOfAs++;}

else if(grades[i]>75){numberOfBs++;}

else if(grades[i]>65){numberOfCs++;}

else if(grades[i]>55){numberOfDs++;}

else{ numberOfFs++;}

}

}

printData:

void printData(double average, int numberOfAs,int numberOfBs,int numberOfCs,int numberOfDs,int numberOfFs)

{

cout<<"Average: "<<average<<endl;

cout<<"Number of A's: "<<numberOfAs<<endl;

cout<<"Number of B's: "<<numberOfBs<<endl;

cout<<"Number of C's: "<<numberOfCs<<endl;

cout<<"Number of D's: "<<numberOfDs<<endl;

cout<<"Number of F's: "<<numberOfFs<<endl;  

}

Explanation:

Your question is poorly formatted. (See attachment for proper presentation of question)

------------------------------------------------------------------------------------------------------------

The first step is to go to the main function and replace

//TODO: Add function calls

with the following 4 lines of code:

getGrades(grades,SIZE);

average = getAverage(grades,SIZE);

countLetterGrades(grades, SIZE, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

printData(average, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

------------------------------------------------------------------------------------------------------------

1. getGrades(grades,SIZE);

This calls the getGrade functions; The getGrade function is where the user inputs 5 grades for a student

2. average = getAverage(grades,SIZE);

Next, is to get the average of the input grades. This is done using the above and the average is stored in variable average

3. countLetterGrades(grades, SIZE, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

Next, is to get letter grade of each number grade. This is done using countLetterGrades function.

4. printData(average, numberOfAs,numberOfBs,numberOfCs,numberOfDs,numberOfFs);

The above 3 functions populate data for average, numberofAs to numberofFs; This values are passed to printData function to to display program output.

------------------------------------------------------------------------------------------------------------

Next complete countLetterGrades and printData functions as seen in the answer section.

For clarity, see the attached cpp file for line by line explanation of the complete code

Question # 3
Fill in the Blank
What is the output?
answer = "Hi mom"
print(answer.lower())

Answers

what not understanding

the output is mom, hope this helped p

Kerri uses a photo editing program a lot. To increase her productivity, she should_____.


delete it from the Start menu

put it in her My Documents folder

move the program to the desktop

create a shortcut for it on Quick Launch

Answers

Answer:

Move the program to the desktop

Explanation:

It will be easier to access and quicker to open.

How are online sources used? Check all that apply.

as a way to learn from others
as a way to play games
as a way to find information
as a way to socialize with others
as a way to copy the work of others

( and if not answer correctly I will report) · ⊃
·

Answers

Answer:

1 3 and 4

Explanation:

Answer:

as a way to learn from others

as a way to find information

as a way to socialize with others

Explanation:

can anyone help with this?​

Answers

The correct answer is Use hanging indents in the second line

Explanation:

One of the recommendations in the works cited page like the one presented is to use hanging indents. This implies the second, third, etc. line of a citation should be indented, while the first line is not indented. This is required by the MLA (Modern Language Association) because it makes citation to be easy to read. According to this, to improve the sample, hanging indents need to be included in the second line of the first and third citation.

Which act passed by the US government in 1998 criminalizes the production and distribution of technology that intends to evade anti-piracy laws?

Answers

The Computer Fraud and Abuse Act I believe. Sorry if I’m wrong and I hope that it helps :)

Answer:

Digital Millennium Copyright Act (DMCA)

Explanation:

i got it right on plato

Identify the type of data for each value below.
12.023
"Hello World
52

Answers

12.023 is float

"Hello World" is string

52 is int

Your teacher is nice. She/He has given it in the order.

The type of data for 12.023 is a float, "Hello World is a string, and 52 is a int.

What are the type of data?

The  type of data in computer science can be given as the data values that helps in the analysis of the type of operation that is to be performed. The data types in python are given as classes.

The type of data type is:

The point numbers are given as floating. Hence, 12.023 is a float.

The text form is given as string or str data type. Hence, "Hello World is a string.

The whole numbers positive or negative are given as integers or int. Hence, 52 is a int.

Learn more about data type, here:

https://brainly.com/question/22574321

#SPJ2

2.4 Code Practice: Question 1
Write the code to input a number and print the square root. Use the absolute value function to make sure that if the user enters a negative number, the program does not crash. How do I do this in python ???

Answers

Code in Python:

num = float(input("Enter any number : "))

ab = abs(num)

sqrt = float(ab ** 0.5)

print(sqrt)

The code to input a number and print the square root is,

import math

# Input a number from the user

number = float(input("Enter a number: "))

# Use the absolute value function to handle negative numbers

abs_number = abs(number)

# Calculate the square root using the math module

sqrt_number = math.sqrt(abs_number)

# Print the square root

print(f"The square root of {number} is {sqrt_number}")

Given that,

Write the code to input a number and print the square root.

Now, A code snippet in Python that accomplishes what you described:

import math

# Input a number from the user

number = float(input("Enter a number: "))

# Use the absolute value function to handle negative numbers

abs_number = abs(number)

# Calculate the square root using the math module

sqrt_number = math.sqrt(abs_number)

# Print the square root

print(f"The square root of {number} is {sqrt_number}")

In this code, the abs() function ensures that even if the user enters a negative number, it will be converted to its positive equivalent before calculating the square root.

The math.sqrt() function is used to compute the square root, and the result is printed using the print() function.

To learn more about Function visit:

https://brainly.com/question/11624077

#SPJ6

4.8 Code Practice: Question 2

Answers

Answer:

for y in range(88, 43, -4):

   print(y, end=" ")

Explanation;

yw

What number will be output by the console.log command on line 5?
A. 10
B. 11
C. 12
D. 13
E. 16

Answers

Answer:

E

Explanation:

If you follow the line of code and add 1, 2, and then 3, 10 + 1 + 2 + 3 = 16.

The output of the block of code will be 16 as the value of the variable is assigned a new value based on the number added to it on each line.

The initial value of the variable oop is 10

On the next line, 1 is added to oop and the resulting value is reassigned to the same variable, the new value of oop is 11

On the next line, 2 is added to oop and the resulting value is reassigned to oop, the new value of oop becomes 13

Variable oop is then increased by 3 ; making the value become (13 + 3) = 16

Therefore, the output of the command is 16.

Learn more :https://brainly.com/question/18505492

if you put your tik down below I'll tell them to follow

Answers

Answer:

oreo._.thecat7

Explanation:

...................

Answer

I dont have a acc !

Exp

bc i dont like that app a lot

What is the purpose of the introduction in an expository essay? A. to introduce the author and his or her dedication B. to highlight the main points of the essay C. to describe the supporting details D. to provide a figurative interpretation of the essay

Answers

I think it’s B, sorry if I’m wrong with this >

What is used to give credit to the source from which information is obtained?
a citation
linkage
plagiarism
a format

Answers

a citation gives credit to the source

Answer:

a citation

Explanation:

Other Questions
The meteorologist says that it is snowing outside. The weather characteristic being described is __________. A. air pressure B. humidity C. precipitation D. temperature If y varies jointly as x and z and inversely as the square of w, and y = 3 when x = 3, Z = 10, and w = 2, then y = 4 when x = 4, z = 20, and w= 4.True or False ? Can you please make a slogan about Cultural Awareness? What is the answer for this?? choose the translation that best fits this expression: -1/6 + 3x - 2y Cardi B is buying a condo built withina skyscraper. She learned that each floor is 13 feet tall. Write an expression to represent the height of the skyscraper if it has f floors, where f is the number of floors. How tall, in feet, would her condo be in the skyscraper if she was on the 26th floor?PLEASE HELP... 25 points WILL GIVE BRAINLIEST!!!!When answering the question Where? in an anecdote, what should you remember about the form?a.) An anecdote happens in one place during one brief time period.b.) An anecdote is less about setting than about character development.c.) An anecdote should include flashbacks to other periods of time.d.) An anecdote's setting should shift often from place to place. Will you always be able to use rigid transformations to verify that two shapes are congruent or not congruent? If yes, why is that the case? If not, why not? ( plz answer its a big grade plzzz thx you to whoever helps) For Part A, use a piece of paper. For parts B-D, use the text box below.A. Plot the data on a piece of paper. (make sure you label your axes and put a title). Draw a line of best fit. B. Write an equation for the line of best fit. C. What income would a person have if he attended school for 2 years? Explain how you got the answer. D. How many years would you need to attend college in order to have an income of at least $50,000? Simplify to create an equivalent expression.3(2+6d)-5=3(2+6d)5=?can someone tell me how i solve this i will give brainliest to the best answer Four people each have a different willingness to pay for one unit of a good: George will pay $15, Glen will pay $12, Tom will pay $10, and Peter will pay $8. If price decreases from $9 to $8 then the consumer surplus from this unit will increase by___. The consumer surplus is calculated as the marginal benefit or the value of the good minus its price, then summed over the quantity bought. If the price is $9, there are only 3 people (George, Glen, and Tom) who would buy the goods. Since Peter wants to pay $8, he will not buy this good since its price ($9) is higher than his willingness to pay. The consumer surpluses for George, Glen, and Tom are $6 (=15 - 9), $3 (=12 - 9), and $1 (=10 - 9), respectively. The total consumer surplus would be $10 (= 6 + 3 + 1). If the price is $8, all of them would be willing to buy the goods. The consumer surpluses for George, Glen, Tom, and Peter are $7 (=15 - 8) $4 (=12 - 8), $2 (=10 - 8), and $0 (=8 - 8), respectively. The total consumer surplus would be $13 (= 7 + 4 + 2). Thus, if price decreases from $9 to $8 then the consumer surplus from this unit will increase by $3. If the price increases from $9 to $11, what would be the decrease in consumer surplus? Why does my girlfriend blush when I tell her I love her Identify the type of plate boundary shown in this picture. Explain how this type of boundary provides evidence that Earth's magnetic poles have reversed. Please answer this question :) Why do vegetables often need to be separated when roasting?-They cook at different speeds.-They require different temperatures.-Cucumbers must be roasted separately.-To keep the flavors from blending together. Based on context clues, what does impartial mean in the following sentence "Journalists can cover anything they choose and from any view point, whether impartial or intentionally based." Hi, Can you help me with the area and perimeter? A quality control expert at LIFE batteries wants to test their new batteries. The design engineer claims they have a variance of 2601 with a mean life of 1191 minutes. If the claim is true, in a sample of 167 batteries, what is the probability that the mean battery life would differ from the population mean by less than 3.5 minutes? Read the excerpt from "Civil Peace" by Chinua Achebe. "OK. Time de go. Make you open dis window and bring the twenty pound. We go manage am like dat." Which statement best summarizes the message conveyed in this dialect? "Time for you to leave. Make this window open up or give me the money. We will manage it after." "Its time to go. Open up the window and throw the money out. We will spend it all later." "Time to go. Open this window and put the money outside. We will spend it all later." "Its time to go. Open this window and bring the money or else. Were done playing around." a=3b+4c-a is this a litteral equation