Shortest Remaining Time First is the best preemptive scheduling algorithm that can be implemented in an Operating System.
a. True
b. False
Answer:
a
Explanation:
Yes, true.
Shortest Remaining Time First, also popularly referred to by the acronym SRTF, is a type of scheduling algorithm, used in operating systems. Other times it's not called by its name nor its acronym, it is called the preemptive version of SJF scheduling algorithm. The SJF scheduling algorithm is another type of scheduling algorithm.
The Shortest Remaining Time First has been touted by many to be faster than the SJF
The answer to the question which asks if the Shortest Remaining Time First is the best preemptive scheduling algorithm that can be implemented in an Operating System is:
TrueWhat is Shortest Remaining Time First?This refers to the type of scheduling algorithm which is used to schedule tasks that would be executed in the processing unit in an Operating System based on the shortest time taken to execute the task.
With this in mind, we can see that this is the best preemptive scheduling algorithm that can be implemented in an Operating System because it makes task execution faster.
Read more about scheduling algorithm here:
https://brainly.com/question/15191620
PLEASE help me I will really appreciate it
The Classic Triangle Testing Problem, (Myer's Triangle): A program reads three integer values. The three values are interpreted as representing the lengths of the sides of a triangle. The program prints a message that states whether the triangle is scalene, isosceles, or equilateral. Develop a set of test cases (at least 6 ) that you feel will adequately test this program. (This is a classic testing problem and you could find numerous explanations about it on the internet. I would recommend that you try to submit your own answer, based on your understanding of the topic)
Let’s define what the three different types of triangle requirements for the side’s lengths are:______.
Answer:
Here is the Python program:
def MyersTriangle(a, b, c): #method to test triangles
if not(isinstance(a, int) and isinstance(b, int) and isinstance(c, int)): #checks if values are of type int
return 'Enter integer values'
elif a==0 or b==0 or c==0: #checks if any value is equal to 0
return 'Enter integer values greater than 0'
elif a<0 or b<0 or c <0: #checks if any value is less than 0
return 'All values must be positive'
elif not (a+b>=c and b+c>=a and c+a>=b): #checks if triangle is valid
return 'Not a valid triangle'
elif a == b == c: #checks if triangle is equilateral
return 'triangle is equilateral'
elif a == b or b == c: #checks if triangle is isoceles
return 'triangle is isoceles'
elif a != b and a != c and b != c: #checks if triangle is scalene
return 'triangle is scalene'
#test cases
print(MyersTriangle(2.4,7.5,8.7))
print(MyersTriangle(0,0,0))
print(MyersTriangle(-1,5,4))
print(MyersTriangle(10,10,25))
print(MyersTriangle(5,5,5))
print(MyersTriangle(3,3,4))
print(MyersTriangle(3,4,5))
Explanation:
The program uses if elif conditions to check:
if the values are integers: this is checked by using isinstance method that checks if values belongs to a particular int. If this returns true then values are integers otherwise not
if values are not 0: this is checked by using logical operator or between each variable which checks if any of the values is 0
if values are not negative: This is checked by using relational operator < which means the values are less than 0
if values make a valid triangle: this is checked by the rule that the sum of two sided of the triangle is greater than or equal to the third side.
and then checks if the triangle is scalene, isosceles, or equilateral: This is checked by the following rules:
For scalene all three sides are unequal in length
For isosceles any of the two sides are equal in length
For equilateral all sides should be equal in length.
The screenshot of the program along with the output is attached.
Write a program that finds the number of items above the average of all items. The problem is to read 100 numbers, get the average of these numbers, and find the number of the items greater than the average. To be flexible for handling any number of input, we will let the user enter the number of input, rather than fixing it to 100.
Answer:
Written in Python
num = int(input("Items: "))
myitems = []
total = 0
for i in range(0, num):
item = int(input("Number: "))
myitems.append(item)
total = total + item
average = total/num
print("Average: "+str(average))
count = 0
for i in range(0,num):
if myitems[i] > average:
count = count+1
print("There are "+str(count)+" items greater than average")
Explanation:
This prompts user for number of items
num = int(input("Items: "))
This creates an empty list
myitems = []
This initializes total to 0
total = 0
The following iteration gets user input for each item and also calculates the total
for i in range(0, num):
item = int(input("Number: "))
myitems.append(item)
total = total + item
This calculates the average
average = total/num
This prints the average
print("Average: "+str(average))
This initializes count to 0
count = 0
The following iteration counts items greater than average
for i in range(0,num):
if myitems[i] > average:
count = count+1
This prints the count of items greater than average
print("There are "+str(count)+" items greater than average")
Which of the following is often accessed in a browser but is not itself a browser feature or tool?
O history
add-ons
O bookmarks
webmail
Answer:
Webmail
Explanation:
Got it right on a test
Research an organization that is using supercomputing, grid computing or both. Describe these uses and the advantages they offer. Are they a source of competitive advantage? Why or why not? Please be sure to include your reference(s).
Answer:
Procter and Gamble is an organization that uses supercomputing.
Explanation:
Supercomputing refers to the use of high-performance computers in the development and production of items. Procter and Gamble is a company known for the production of many household items and personal care products. Uses and advantages of supercomputing to this company include;
1. Testing virtual prototypes of substances used in production: This is a faster way of developing products that are sustainable because many prototypes can be examined with the help of computers and the best chosen for production.
2. Developing unique designs of products: Supercomputers allow for the development of high-quality designs which include the internal and external designs of products.
3. Simulation of many molecules: Molecules such as those involved in the production of surfactants can be analyzed to understand how they work with the aid of supercomputers.
4. Computational fluid dynamics: This helps the scientists to understand how fluid works using numerical analysis and the structure of compounds.
The designs and products obtained through supercomputing are a source of competitive advantage because the company can make high-quality and unique products that appeal to customers and meet the latest trends. This would increase their marketability and give them an advantage over companies that do not have access to these computers.
Reference: The Department of Energy. (2009) High-Performance Computing Case Study. Procter & Gamble's Story of Suds, Soaps, Simulations, and Supercomputers
Write a program called DeliveryCharges for the package delivery service in Exercise 4. The program should again use an array that holds the 10 zip codes of areas to which the company makes deliveries. Create a parallel array containing 10 delivery charges that differ for each zip code. Prompt a user to enter a zip code, and then display either a message indicating the price of delivery to that zip code or a message indicating that the company does not deliver to the requested zip code.
Answer:
zip_codes = ["11111", "22222", "33333", "44444", "55555", "66666", "77777", "88888", "99999", "00000"]
charges = [3.2, 4, 1.95, 5.7, 4.3, 2.5, 3.8, 5.1, 6.6, 7.3]
deliver = False
index = -1
zip_code = input("Enter the zip code: ")
for i in range(len(zip_codes)):
if zip_code == zip_codes[i]:
deliver = True
index = i
break
if deliver:
print("The charge of delivery to " + zip_codes[index] + " is $" + str(charges[index]))
else:
print("There is no delivery to " + zip_code)
Explanation:
*The code is in Python.
Initialize the zip_codes array with 10 zip codes
Initialize the charges array with 10 corresponding values
Initialize the deliver as False, this will be used to check if the zip code is in the zip_codes
Initialize the index, this will be used if the zip code is a valid one, we will store its index
Ask the user to enter the zip_code
Create a for loop that iterates the length of the zip_codes array. Inside the loop:
Check if the zip_code is equal to the any of the items in the zip_codes. If it is, set the deliver as True, set the index as i, and break
When the loop is done, check the deliver. If it is True, then print the charge of the delivery. Otherwise, print that there is no delivery to that zip code
Sukhi needs to insert a container into her form to collect a particular type of information.
Which object should she insert?
Answer:
text box
Explanation:
on edge 2020
Answer:
A- text box
Explanation: ;)
PLEASE HELP WILL GIVE BRAINLIEST IM ALREADY FAILING IN THIS CLASS LOL < 3
Answer: Did you ever think of a mirror?
Explanation: Not trying to be rude about it.
Read the scenario below, and then answer the question.
Dan is trying to decide on what his major should be in college, so he chooses to take a personality
test.
What can Dan expect to learn from this test?
A. the weaknesses he can address and the strengths he has
B. the academic areas he
might have natural talent and ability in
C. which methods of solving problems and interacting with others he favors
D. what his favorite hobbies and interests are
the answer is:
c. which methods of solving problems and interacting with others he favors.
Answer:
C
Explanation:
Earned value:
How is it calculated?
What does the measurement tell you?
Answer:
Earned value is a measure which is used on projects to determine the value of work which has been completed to date, in order to understand how the project is performing on a cost and schedule basis. At the beginning of a project, a project manager or company will determine their budget at completion (BAC) or planned value (PV).
Explanation:
Is main memory fast or slow?
Answer:
Slower
Explanation:
Write a function to receive any word as input, search the song titles only and return the number of top billboard songs that contain that word. Your function should meet the following requirements: Your function should receive any word or phrase as an input string and return a simple message with the number of songs that contain those words. E.g. [5] songs were found to contain [supplied phrase] in this dataset If the words or phrase supplied were not found in the database, return the message No songs were found to contain the words: [supplied phrase] Remember to deal with whatever letter case you are supplied i.e. all caps or all lowercase, etc. Test your function with the word like and confirm that your result reads [100] songs were found to contain [like] in this dataset
Answer:
Here is the function:
def NumberOfSongs(word): # function definition
count=0 #count the occurrence of word in song
for song in lyrics['Lyrics']: #iterates through song lyrics
if word in str(song): #if word is in the song
count=count+1 #adds 1 to the count
if count!=0: #if word occurs in the songs
return f'{str(count)} songs were found to contain {word} in this dataset' #display the count of the word in the song
else: #if word does not appear in any song
return f'No songs were found to contain the words:{word}' #returns this message if no songs were found with given word
print(NumberOfSongs('like')) #calls method with the word like given as parameter to it
Explanation:
You can add the csv file this way:
import pandas as pd
lyrics = pd.read_csv("lyrics.csv", encoding="cp1252")
Now you can use the NumberOfSongs method which iterates through the Lyrics of lyrics.csv and find if any of the songs in the file contains the specified word.
The screenshot of program along with its output is attached. Since the file was not provided i have created a csv file. You can add your own file instead of lyrics.csv
1. What is a technological system?*
A.a system that takes an input, changes it according to the system's use, and then
produces an output output
B.a system that takes an output, changes it according to the system's use, and then
produces an input
C.a system that starts with a process, then output resources in the input
Answer:
c.a system that start with a process, them output resources in the input
Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both single words. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya
Answer:
Written in Python:
import re
name = input("Name: ")
print(re.sub("[ ]", ", ", name))
Explanation:
This line imports the regular expression library
import re
This line prompts user for input
name = input("Name: ")
This line replace the space with comma and prints the output
print(re.sub("[ ]", ", ", name))
True or False: Wikipedia is a reliable source.
Answer:
Answers are given by the users, so reliable information varies. Usually, you can find if it is reliable by checking other websites to see if the information matches up with other reliable websites.
Explanation:
Which of the following may be stored in an
e-mail address book? Check all of the boxes that
apply.
names
e-mail addresses
physical addresses
subjects of e-mails
fax numbers
Answer:
names, email addresses, subjects of e-mails
Explanation:
Answer:
names
e-mail addresses
physical addresses
fax numbers
Explanation:
correct answers
Define a function called sum, for a given an array and an int representing its size, if the size is at least 3, then sum up all elements whose indices are a multiple of 3 and return that value, otherwise, return 0.
Answer:
Written in C++
int sum(int arr[], int size) {
int total = 0;
if(size>=3) {
for (int i = 0; i < size; ++i) {
if(i%3 == 0) {
total += arr[i];
}
}
}
return total;
}
Explanation:
This line defines the function
int sum(int arr[], int size) {
This line initializes sum to 0
int total = 0;
This line checks if size is at least 3
if(size>=3) {
This loop iterates through the array
for (int i = 0; i < size; ++i) {
The following adds multiples of 3
if(i%3 == 0) {
total += arr[i];
}
}
}
This returns the calculated sum
return total;
}
See attachment for full program
Define a Python function named matches that has two parameters. Both parameters will be lists of ints. Both lists will have the same length. Your function should use the accumulator pattern to return a newly created list. For each index, check if the lists' entries at that index are equivalent. If the entries are equivalent, append the literal True to your accumulator. Otherwise, append the literal False to your accumulator.
Answer:
The function in Python is as follows:
def match(f1,f2):
f3 = []
for i in range(0,len(f1)):
if f1[i] == f2[i]:
f3.append("True")
else:
f3.append("False")
print(f3)
Explanation:
This line defines the function
def match(f1,f2):
This line creates an empty list
f3 = []
This line is a loop that iterates through the lists f1 and f2
for i in range(0,len(f1)):
The following if statement checks if corresponding elements of both lists are the same
if f1[i] == f2[i]:
f3.append("True")
If otherwise, this is executed
else:
f3.append("False")
This prints the newly generated list
print(f3)
Write a function addUpSquaresAndCubes that adds up the squares and adds up the cubes of integers from 1 to N, where N is entered by the user. This function should return two values - the sum of the squares and the sum of the cubes. Use just one loop that generates the integers and accumulates the sum of squares and the sum of cubes. Then, write two separate functions sumOfSquares and sumOfCubes to calculate and return the sums of the squares and sum of the cubes using the explicit formula below.
Answer:
All functions were written in python
addUpSquaresAndCubes Function
def addUpSquaresAndCubes(N):
squares = 0
cubes = 0
for i in range(1, N+1):
squares = squares + i**2
cubes = cubes + i**3
return(squares, cubes)
sumOfSquares Function
def sumOfSquares(N):
squares = 0
for i in range(1, N+1):
squares = squares + i**2
return squares
sumOfCubes Function
def sumOfCubes(N):
cubes = 0
for i in range(1, N+1):
cubes = cubes + i**3
return cubes
Explanation:
Explaining the addUpSquaresAndCubes Function
This line defines the function
def addUpSquaresAndCubes(N):
The next two lines initializes squares and cubes to 0
squares = 0
cubes = 0
The following iteration adds up the squares and cubes from 1 to user input
for i in range(1, N+1):
squares = squares + i**2
cubes = cubes + i**3
This line returns the calculated squares and cubes
return(squares, cubes)
The functions sumOfSquares and sumOfCubes are extract of the addUpSquaresAndCubes.
Hence, the same explanation (above) applies to both functions
Two of the computers at work suddenly can’t go online or print over the network. The computers may be trying to share the same IP address.
Which strategy is most likely to solve the problem?
rebooting the network server
reconfiguring the network hubs
installing network gateway hardware
logging off one of the computers, and then logging back o
Answer:
logging off one of the computers, and then logging back on
Answer:
the last one:
logging off one of the computers, and then logging back on
Explanation:
if something goes wrong on an electronic device you can reboot it and it should eventually work.
have a nice day
For an alternative to the String class, and so that you can change a String's contents, you can use_________ .
a. char.
b. StringHolder.
c. StringBuilder.
d. StringMerger.
Answer:
c. StringBuilder
Explanation:
An alternative to the String class would be the StringBuilder Class. This class uses Strings as objects and allows you to mix and match different strings as well as adding, removing, implementing, and modifying strings themselves as though they were similar to an array. Unlike the string class StringBuilder allows you to modify and work with a combination of strings in the same piece of data as opposed to having various objects and copying pieces which would take up more memory.
I prefer a job where I am praise for good performance or I am accountable for results
Answer:
What?
Explanation:
If the post office delivered mail exactly like the routers deliver messages on the Internet, which of the following statements would be true? (Choose all that apply)
Answer:
The mailman would sometimes take a different path to deliver each letter to your home.
Explanation:
Options:
The mailman would sometimes take a different path to deliver each letter to your home.
Letters would be written on the outside of envelopes for all to read instead of letters put inside envelopes.
Routers work in different ways and they take the fastest route no matter what is the direction they have to take, so they travel to several servers trying to find the fastest path to their destination, it changes almost everytime because of the use of servers and the conection speed of the different routes they can connect to, so that would be the option.
MULTIPLE CHOICE If you are completing your math homework on a desktop in the computer lab at school, the software is
A Single use
B Locally installed
С On a network
D utility
Answer:
Single use i think
Explanation:
Answer: im pretty sure on a network.
Explanation:
You've been hired by Maple Marvels to write a C++ console application that displays information about the number of leaves that fell in September, October, and November. Prompt for and get from the user three integer leaf counts, one for each month. If any value is less than zero, print an error message and do nothing else. The condition to test for negative values may be done with one compound condition. If all values are at least zero, calculate the total leaf drop, the average leaf drop per month, and the months with the highest and lowest drop counts. The conditions to test for high and low values may each be done with two compound conditions. Use formatted output manipulators (setw, left/right) to print the following rows:________.
September leaf drop
October leaf drop
November leaf drop
Total leaf drop
Average leaf drop per month
Month with highest leaf drop
Month with lowest leaf drop
And two columns:
A left-justified label.
A right-justified value.
Define constants for the number of months and column widths. Format all real numbers to three decimal places. The output should look like this for invalid and valid input:
Welcome to Maple Marvels
------------------------
Enter the leaf drop for September: 40
Enter the leaf drop for October: -100
Enter the leaf drop for November: 24
Error: all leaf counts must be at least zero.
End of Maple Marvels
Welcome to Maple Marvels
------------------------
Enter the leaf drop for September: 155
Enter the leaf drop for October: 290
Enter the leaf drop for November: 64
September leaf drop: 155
October leaf drop: 290
November leaf drop: 64
Total drop: 509
Average drop: 169.667
Highest drop: October
Lowest drop: November
End of Maple Marvels
Answer:
#include <iostream>
#iclude <iomanip>
#include <algorithm>
using namespace std;
int main(){
int num1, num2, num3,
int sum, maxDrop, minDrop = 0;
float avg;
string end = "\n";
cout << " Enter the leaf drop for September: ";
cin >> num1 >> endl = end;
cout << "Enter the leaf drop for October: ";
cin >> num2 >> endl = end;
cout << "Enter the leaf drop for November: ";
cin >> num3 >> endl = end;
int numbers[3] = {num1, num2, num3} ;
string month[3] = { "September", "October", "November"}
for ( int i =0; i < 3; i++) {
if (numbers[i] < 0) {
cout << "Error: all leaf counts must be at least zero\n";
cout << "End of Maple Marvels\n";
cout << "Welcome to Maple Marvels";
break;
} else if (number[i] >= 0 ) {
sum += number[i] ;
}
}
for (int i = 0; i < 3; i++){
cout << month[i] << " leaf drop: " << numbers[i] << endl = end;
}
cout << "Total drop: " << sum << endl = end;
cout << setprecision(3) << fixed;
cout << "Average drop: " << sum / 3<< endl = end;
maxDrop = max( num1, num2, num3);
minDrop = min(num1, num2, num3);
int n = sizeof(numbers)/sizeof(numbers[0]);
auto itr = find(number, number + n, maxDrop);
cout << "Highest drop: "<< month[ distance(numbers, itr) ] << endl = end;
auto itr1 = find(number, number + n, minDrop);
cout << "Lowest drop: " << month[ distance(numbers, itr1) ] << endl = end;
cout << "End of Maple Marvels";
Explanation:
The C++ soucre code above receives three integer user input and calculates the total number, average, minimum and maximum number of leaf drop per month, if the input isn't less than zero.
When you check to see how much RAM, or temporary storage you have available, you are checking your _____.
primary memory
secondary storage
secondary memory
tertiary storage
When you check to see how much RAM, or temporary storage you have available, you are checking your primary memory.
The correct option is first.
What is drive?Drive provides a storage space and speed for processing the data in the drive on the personal computers or laptops at low cost.
RAM, also known as Random Access Memory, is storage drive which is temporary but primary.
So, RAM is considered as primary memory.
Thus, when you check to see how much RAM, or temporary storage you have available, you are checking your primary memory.
Learn more about drive.
https://brainly.com/question/10677358
#SPJ2
The state way of grading drivers is called what?
*
Who plays Breath of the Wild?
Answer:
me
Explanation:
yea not me
Explanation:
Your program is going to compare the distinct salaries of two individuals for the last 5 years. If the salary for the two individual for a particular year is exactly the same, you should print an error and make the user enter both the salaries again for that year. (The condition is that there salaries should not be the exact same).Your program should accept from the user the salaries for each individual one year at a time. When the user is finished entering the salaries, the program should print which individual made the highest total salary over the 5 year period. This is the individual whose salary is the highest.You have to use arrays and loops in this assignment.In the sample output examples, what the user entered is shownin italics.Welcome to the winning card program.
Enter the salary individual 1 got in year 1>10000
Enter the salary individual 2 got in year 1 >50000
Enter the salary individual 1 got in year 2 >30000
Enter the salary individual 2 got in year 2 >50000
Enter the salary individual 1 got in year 3>35000
Enter the salary individual 2 got in year 3 >105000
Enter the salary individual 1 got in year 4>85000
Enter the salary individual 2 got in year 4 >68000
Enter the salary individual 1 got in year 5>75000
Enter the salary individual 2 got in year 5 >100000
Individual 2 has the highest salary
In python:
i = 1
lst1 = ([])
lst2 = ([])
while i <= 5:
person1 = int(input("Enter the salary individual 1 got in year {}".format(i)))
person2 = int(input("Enter the salary individual 1 got in year {}".format(i)))
lst1.append(person1)
lst2.append(person2)
i += 1
if sum(lst1) > sum(lst2):
print("Individual 1 has the highest salary")
else:
print("Individual 2 has the highest salary")
This works correctly if the two individuals do not end up with the same salary overall.