v
Write a program that calculates and displays different suggested tip amounts, much like you see at the bottom of restaurant bills. Here is a sample execution:
Sample Execution:
Enter the total bill amount: $50
Suggested Tip Amounts: 10%: $5.00(for okay service) 15%: $7.50(for good service) 20%: $10.00(for great service) Total with tip: $57.50
Requirements:
2 pts - When you name your file use your last name – for example: LastNameHW04.py
3 pts - Place a comment at the top of your code with your name and the purpose of the program.
10 pts - The program should start by asking the user for input exactly in the form
below. Their response (input) should be stored in a variable. The amount they enter should be converted to a float in order to allow for decimals to be entered and to do math using it.
Enter the total bill amount: $
15 pts - Use three lines of code to store the 10%, 15% and 20% tip values into three different variables.
10 pts - Variables names must follow Python standard naming conventions.
5 pts – For output, the program should first display the statement below on one line:
Suggested Tip Amounts:
30 pts – Next, use three lines of code to print the calculated tip amounts exactly as shown below. There should not be a space after the $, and to output the % symbol, enter %%. The values in red below will vary based on the user input:
10%: $5.00(for okay service) 15%: $7.50(for good service) 20%: $10.00(for great service)
5 pts - Include additional comments throughout your code explaining what your code does. Remember comments start with #.
20 pts - Extend the program to output an addendum to the receipt that adds a mandatory 15% tip to the total bill amount. You will need an additional variable to store the final cost after adding the tip to the toal bill amount. Output the final total.
Prompt for input
Example of Input: 50
Total with tip: $57.50
In: Computer Science
Can anyone please sort the differential evolution alogrithim for the sake of automatic time table generator?
In: Computer Science
In: Computer Science
What is the enhanced ER Model? Explain extended ER features: Specialization, Generalization, and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them?
In: Computer Science
Create one major Activity Diagram & one major Sequence diagram for the BigBasket Platform. (The solution should not be handwritten)
** You take any process or section or functionality of BigBasket Platform and make the above-mentioned Diagrams for it.**
In: Computer Science
In: Computer Science
A certain Professor Amongus claims that the order in which a fixed set of ele- ments is inserted into a binary search tree does not matter—the same tree results every time. Give a small example that proves Professor Amongus wrong.
In: Computer Science
case study
Target Corp – Data Mining in Retail Target is a large retail chain that crunches data to develop insights that help target marketing and advertising campaigns. Target analysts managed to develop a pregnancy prediction score based on a customer's purchasing history of 25 products. In a widely publicized story, they figured out that a teenage girl was pregnant before her father did. The targeting can be quite successful and dramatic as this example published in the New York Times illustrates. About a year after Target created their pregnancy-prediction model, a man walked into a Target store and demanded to see the manager. He was clutching coupons that had been sent to his daughter and he was angry, according to an employee who participated in the conversation. “My daughter got this in the mail!” he said. “She’s still in high school, and you’re sending her coupons for baby clothes and cribs? Are you trying to encourage her to get pregnant?” The manager didn’t have any idea what the man was talking about. He looked at the mailer. Sure enough, it was addressed to the man’s daughter and contained advertisements for 70 maternity clothing, nursery furniture and pictures of smiling infants. The manager apologized and then called a few days later to apologize again. On the phone, though, the father was somewhat subdued. “I had a talk with my daughter,” he said. “It turns out there’s been some activities in my house I haven’t been completely aware of. I owe you an apology.” (Source: New York Times).
Answer for this questions is just below but its someone else work , can you help me with this similar answer for this question.i just gave you the hint how to do this .
Answer: As a Retailer or Target store manager, they have right to collect all the order value or purchase material information about customer. But the store keeper are predicting the future things by the analysing last twenty-five product that she bought from the store. It’s hard for parent to accept the pregnancy result of their teen-age and high school daughter so they can be angry. Because, their prediction cannot be sure all the time, they should concern with customer before making any future guesses and sending any coupons to the customer’s address. Things can be different like may she had bought all those materials to her pregnant friends, or may be she was gifting it to her baby nieces. So shopkeeper should concern about these thing before making any prediction.
In: Computer Science
discuss one of the services Windows offers. Give a quick
description of the service, how to configure and enable it, whether
the system uses it all the time, or just when you turn it on, and
what your opinion is of the service. Does it do everything it needs
to do for the user? What about ease of use?
In: Computer Science
List and discuss categories of threats (at least 4) that information systems face.
In: Computer Science
discusses stopping, starting and restarting services. How often should you, as the administrator of your machine, have to do that? Should the operating system handle these tasks? Should this all be automated? When changing the attribute of the service, how does it affect other services? Discuss this and any other facts about these tasks in your homework.
In: Computer Science
Programming Task 1:
Please use the following framework to implement a class for partially filled arrays.
class PartiallyFilledArray
{
double[] content; // content of the array
int size; // actual size of the array
// creating an array whose physical size is 100
PartiallyFilledArray()
{
// your implementation
}
// creating an array whose physical size is given by maxSize
PartiallyFilledArray(final int maxSize)
{
// your implementation
}
// insertion
boolean insert(_____________________)
{
// your implementation
}
// deletion
boolean delete(_____________________)
{
// your implementation
}
// displaying all elements
void display()
{
// your implementation
}
}
Programming Task 2:
Please use the above class to create an empty partially filled array whose maximum size is 2000. (1) Consecutively add 20 different random integer values ranging from -100 to 100 to the array and display the content. (2) Delete the first 3 elements and display the content. Notice that you should not directly use the internal data field of PartiallyFilledArray in your test code.
In: Computer Science
How does the cloud consumer interact with the appropriate
systems to
gain access to the required services. What different portals help
the
consumer to achieve this?
In: Computer Science
JAVA Using the java.util.Calendar class, create 3 dates and times. Write a method to identify and print out the oldest of the 3 timestamps. Likewise, create another method that prints out the most recent time.
In: Computer Science
Examine computer-assisted tools and techniques for the auditing process to examine effective controls. How do these tools help IT managers maintain systems operations? How do the tools and techniques support the internal and external auditing process?
In: Computer Science