Answer: Provided in the explanation section
Explanation:
We will follow this question carefully with a well precise answer.
I hope at the end of the day, you find this useful.
Answer to First part:
-----------------------
Here as Charlie has not taken any one's permission even policy authority so using such keylogger tool is completely ethical violation on charlie's part. Because any decession that has taken by a company its not an issue until everyone agreed to it. Because without knowledge of such software the people will not be aware and they may get trap and also there is not any written document regarding the acknowledgement so its completely wrong or illegal to blame someone based on result of such softwares. And second illegal thing is to copy some else's encryption key because the policy should be equal to all the people and it should not be used for personal gain.
Answer to second part:
=================
No it is still not ethical action on Charle's part because the policy should be same for everyone and as Charlie is the one who installed this software so he should keep this secrate and not to misuse as its not a matter how Peter came to know his encryption key from Charlie but why should Charlie in first place copy the encryption key for peter and share the encryption code with Peter,its completely unethical.
cheers i hope this helped !!
Answer:
Since Python is a scripting language, here is code in python.
#prompt user to give check
amount=float(input("Please Enter the check:"))
#prompt user to give service
service=input("Please Enter the service (good, fair or poor):")
# calculate tip on the basis of service
if service =="good":
tip=amount*0.2
elif service=="fair":
tip=amount*0.15
elif service=="poor":
tip=amount*0.05
#calculate total
total=amount+tip
#print tip
print("tip is equal to : {} ".format(tip))
#print total
print("total of the check is : {} ".format(total))
Explanation:
Prompt user to give check and service input.After taking the input from user, based on the service tip will be calculated. if service is "good" then tip will be 20% of the check, tip will be 15% if service is "fair" and tip will be 5% if service is "poor".
Output:
Please Enter the check:125
Please Enter the service (good, fair or poor):good
tip is equal to : 25.0
total of the check is : 150.0
Check who you are sending it to before you hit send
You can't you need to answer questions I think
Input is the right answer.hope it helps.