Solution :
x = float_(input())
y = float_(input())
z = float_(input())
res1 = x**z
res2 = x**(y**z)
res3 = abs(x-y)
res4 = (x**z)**0.5
print('{:.2f} {:.2f} {:.2f} {:.2f}'.format(res1,res2,res3,res4))
Output is :
5.0
1.5
3.2
172.47 361.66 3.50 13.13
I would think option A.
b doesn't give enough information and c would go under last work experience
Answer:
bill = float(input("Enter the bill amount: "))
rating = int(input("Choose a rating: 1 = Totally satisfied, 2 = Satisfied, 3 = Dissatisfied.: "))
if rating is 1:
tip = bill * 0.2
elif rating is 2:
tip = bill * 0.15
elif rating is 3:
tip = bill * 0.1
print("The rating is: " + str(rating))
print("The tip is: $%.2f" % (tip))
Explanation:
*The code is in Python
- Ask the user for the <em>bill</em> and <em>rating</em>
- Depending on the <em>rating</em>, calculate the <em>tip</em> using <u>if else</u> statement i.e. If the rating is chosen as 1, calculate the tip by taking 20 percent of the bill.
- Print the <em>rating</em> and the <em>tip</em>
Answer:
The code is given below
hours = int(input("Enter time in hour: "))
minutes = int(input("Enter time in minute: "))
total time = (hours * 60) + (minutes + 15
)
total hours = int(total minutes / 60)
minutes = total hours/ 60
print("Hours: " + str(hours))
print("Minutes: " + str(minutes))
Answer:
Check below for answers and explanations.
Explanation:
The major reasons why computer processes are suspended or terminated are:
1. When there is insufficient memory for successful completion of the process
2. When there's an unauthorized access of any of the computer resources by the process.
It is possible that some processes are terminated why some are suspended because, when the system runs out of memory, the running processes are put on hold until the system is able to create free memory space for the completion of the process. In this case the process is suspended. But if the system cannot provide enough space for the process, the process is terminated.
In the example provided in this exercise, some of the processes were suspended because the system wants to create free memory space for their completion while others are terminated either because the available space is not sufficient for their completion or they want to access an unauthorized resources on the system.