Answer:
Explanation:A letter is a written message conveyed from one person to another person through a medium. Letters can be formal and informal. Besides a means of communication and a store of information, letter writing has played a role in the reproduction of writing as an art throughout history.
Answer:
A letter is a written message conveyed from one person to another person through a medium. Letters can be formal and informal. Besides a means of communication and a store of information, letter writing has played a role in the reproduction of writing as an art throughout history.
The program is a sequential program; as such, it does not require loops or conditional statements.
The program in Python, where comments are used to explain each line is as follows:
#This gets input for the cost of the meal
cost = float(input("Cost: "))
#This initializes the local rate tax to 7.25%
local_rate_tax = 0.0725
#This initializes the tip to 18%
tip = 0.18
#This calculates the tax amount
taxAmount = cost * local_rate_tax
#This calculates the tip amount
tipAmount = cost * tip
#This calculates the grand total
grand = cost + taxAmount + tipAmount
#This prints the tax amount
print("Tax amount: {:.2f}".format(taxAmount))
#This prints the tip amount
print("Tip: {:.2f}".format(tipAmount))
#This prints the grand total
print("Grand total: {:.2f}".format(grand))
All outputs are formatted to 2 decimal places.
See attachment for sample run
Read more about similar programs at:
Answer:
Explanation
If I were calculating a tip at a restaurant using the same syntax, it would have been. meal ... New value of meal is double meal times tax. you're saying: (meal + meal) * tax but meal + meal * tax is calculated in the following order meal + (meal * tax) ... eh? ;) The exercise implied it was just reading the equation from right to left.
Paging disk 98%
Other I/O devices 10%
For each of the following, indicate yes or no to say whether or not it will (or is likely to) improve CPU utilization:
a. Install a faster CPU
b. Install a bigger paging disk
c. Increase the degree of multiprogramming
d. Decrease the degree of multiprogramming
e. Install more main memory
f. Install a faster hard disk
g. Increase the page size
Answer:
a. Install a faster CPU - No
b. Install a bigger paging disk - No
c. Increase the degree of multiprogramming - No
d. Decrease the degree of multiprogramming - Yes
e. Install more main memory - Yes
f. Install a faster hard disk - Yes
g. Increase the page size - Yes
Explanation:
a. Install a faster CPU No.
Installing a faster CPU will not improve CPU utilization too much because the CPU utilization is low (20%) and the utilization of the paging disk is very high (98%), we can see that the system has lack of free memory.
b. Install a bigger paging disk No.
Installing a bigger paging disk doesn't improve the CPU utilization because the system has lack of free memory.
c. Increase the degree of multiprogramming No.
If the level of multiprogramming is increased more processes would have to be swapped in and out of the memory with a higher chance of page fault much frequently and the CPU utilization would reduce.
d. Decrease the degree of multiprogramming Yes.
If the level of multiprogramming is reduced less processes would have to be swapped in and out of memory, reducing the chance of page fault and the CPU utilization would improve.
e. Install more main memory
This is likely to improve CPU utilization as more pages can remain resident and not require paging to or from the disks.
f. Install a faster hard disk
With a faster hard disk, the CPU will get more data more quickly and this will lead to faster response and more throughput to the disks. With a faster hard disk, the disk is not a bottleneck to utilization.
g. Increase the page size
Increase the page size will likely degrade the performance, because the internal fragmentation will be worse, the utilization of main memory will be low, more processes will not be able to fit into main memory, and the system will have to spend more time in swapping. So this is as likely to decrease utilization as it is to increase it.
Answer:
balance = float(input("Enter the current credit card balance: "))
purchases = float(input("Enter the amount of new purchases: "))
payments = float(input("Enter the amount of all payments: "))
unpaid = purchases - payments
if unpaid >= 0 and unpaid < 100:
balance = balance + payments - purchases - (unpaid * 0.08)
elif unpaid >= 100 and unpaid <= 500:
balance = balance + payments - purchases - (unpaid * 0.12)
else:
balance = balance + payments - purchases - (unpaid * 0.16)
print("The balance is " + str(balance))
Explanation:
*The code is in Python.
Ask the user to enter the balance, amount of purchases, and amount of payments
Calculate the unpaid balance, subtract payments from purchases
Check the unpaid balance. If it is smaller than 100, calculate the new balance, add payments, subtract purchases and the 8% interest of unpaid balance. If it is between 100 and 500, calculate the new balance, add payments, subtract purchases and the 12% interest of unpaid balance. If it is greater than 500, calculate the new balance, add payments, subtract purchases and the 16% interest of unpaid balance
Print the balance
Answer: Character reference is the tool usually followed in the business world.It is defined as the recommendation that is provided by organization employee that has a relation with the candidate(individual) outside of the work. This also known as the personal reference. The candidate can be friend family or any other known person whose reference is being given.
This is used in the business field for revealing about the personality and character of the candidate apart from the skills and working abilities. It also helps in the hiring of the candidate easily when the description is good in the character reference.
hey hi Mark hi mark
the console output is:
hey 1
hi 2
Mark 1
hi 2
mark 1
Answer:
JavaScript code is given below
Explanation:
function calcWordFrequencies() {
var words = prompt("Enter the sentence below").split(" ");
var unique_words = [], freqencies = [], count = 0;
for (var i = 0; i < words.length; i++) {
var found = false;
for (var j = 0; j < count; j++) {
if (words[i] === unique_words[j]) {
freqencies[j] = freqencies[j] + 1;
found = true;
}
}
if (!found) {
unique_words[count] = words[i];
freqencies[count] = 1;
count++;
}
}
for (var i = 0; i < words.length; i++) {
var result = 0;
for (var j = 0; j < count; j++) {
if (words[i] === unique_words[j]) {
result = freqencies[j];
break;
}
}
console.log(words[i] + " " + result);
}
}
Please Answer Fast!
Answer:
Functions of an operating system. An operating system provides three essential capabilities: It offers a UI through a CLI or GUI; it launches and manages the application execution; and it identifies and exposes system hardware resources to those applications -- typically, through a standardized API.
Explanation: