Answer:
a. ArrayList years
Explanation:
Required
Complete the code segment
The programming question is about Java programming language.
In java, the syntax to declare an ArrayList of no specific datatype is:
ArrayList [List-name] = new ArrayList();
From the question, the name of the ArrayList is years.
So, the syntax when implemented is:
ArrayList years = new ArrayList();
So, the comment /*missing code*/ should be replaced with: ArrayList years
The option that can be used to replace /* missing code */ so that the statement compiles without error is;
A: ArrayList years
This question deals with programming language in Java.
Now, from the question, we are dealing with an ArrayList and In java, the syntax that is used to declare an ArrayList of no specific data type is given as;ArrayList [Lists name] = new ArrayList();
Now, in the question the list name is given as "years". Thus;
The correct statement to replace /* missing code */ so without errors is;
ArrayList years.
Read more about Java syntax at; https://brainly.com/question/18257856
Which are technical and visual demands
that need to be considered when
planning a project?
Answer: Resolution or DPI, deliverables, and file types are important technical and visual demands to consider when planning a project.
Explanation: Keep in mind whether or not the project will be published in print or on the Web.
PLEASE HELP How have phones made us spoiled? How have phones made us unhappy?
Which of the followings is/are true about RISC (Reduced instruction set computing)?
a. RISC (Reduced instruction set computing) architecture has a set of instructions, so high-level language compilers can produce more efficient code
b. It allows freedom of using the space on microprocessors because of its simplicity.
c. Many RISC processors use the registers for passing arguments and holding the local variables.
d. RISC functions use only a few parameters, and the RISC processors cannot use the call instructions, and therefore, use a fixed length instruction which is easy to pipeline.
e. All of the above.
Answer:
e. All of the above.
Explanation:
An instruction set architecture (ISA) can be defined as series of native memory architecture, instructions, addressing modes, external input and output devices, virtual memory, and interrupts that are meant to be executed by the directly.
Basically, this set of native data type specifies a well-defined interface for the development of the hardware and the software platform to run it.
The two (2) main types of architectural design for the central processing unit (CPU) are;
I. Complex instruction set computing (CISC): it allows multi-step operation or addressing modes to be executed within an instruction set. Thus, many low-level operations are being performed by an instruction.
II. Reduced instruction set computing (RISC): it allows fixed length instructions and simple addressing modes that can be executed within a clock cycle.
All of the following statements are true about RISC (Reduced instruction set computing) because they are its advantages over complex instruction set computing (CISC);
a. RISC (Reduced instruction set computing) architecture has a set of instructions, so high-level language compilers can produce more efficient code.
b. It allows freedom of using the space on microprocessors because of its simplicity.
c. Many RISC processors use the registers for passing arguments and holding the local variables.
d. RISC functions use only a few parameters, and the RISC processors cannot use the call instructions, and therefore, use a fixed length instruction which is easy to pipeline.
The options that are true about RISC (Reduced instruction set computing) is; E: all of the above
We are dealing with instruction set computing which is a sequence of instructions, addressing modes, external input & output devices, virtual memory, and other interruptions that are designed to be executed by the user directly.Now, in architectural design meant for the central processing unit (CPU) the benefit of a Reduced instruction set computing (RISC) is that it is a type that allows for a fixed length of instructions with simple addressing styles that can be executed within a clock cycle.Looking at all the given options, we can say they are all true about RISC (Reduced instruction set computing) as they possess advantages over the other type of instruction set computing called complex instruction set computing (CISC).Read more about instruction set computing at; https://brainly.com/question/17493537
A service specialist from your company calls you from a customer's site. He is attempting to install an upgrade to the software, but it will not install; instead, it he receives messages stating that he cannot install the program until all non-core services are stopped. You cannot remotely access the machine, but the representative tells you that there are only four processes running, and their PID numbers are 1, 10, 100, and 1000. With no further information available, which command would you recommend the representative run?
Answer:
kill 1000
Explanation:
COMPUTER STUDIES
31.
Which of the following information
ages lasted between the end of
Bronze age and the spread of Roman
Empire?
A.
B.
C.
D.
E.
Electronic
Industrial
Iron
Mechanical
Stone
Answer:
iron
Explanation:
Question 21
What is the minimum sum-of-products expression for the following Kmap?
AB
00
01
11
10
CD
00
1
0
01
0
0
0
O
11
0
0
1
1
10
1
1
1
1
Answer:
1010010010001010
Explanation:
0100101010010101010
2. Which of the following is a shortcut key to Exit from any operation?
a) Ctrl+R
b) Ctrl+Q
c) Ciri-Y
Answer:
Its b) Ctrl+Q. Hope it helps.
Explanation:
Answer:
ctrl r
Explanation:
ctrl r is redo
A realtor is studying housing values in the suburbs of Minneapolis and has given you a dataset with the following attributes: crime rate in the neighborhood, proximity to Mississippi river, number of rooms per dwelling, age of unit, distance to Minneapolis and Saint Paul Downtown, distance to shopping malls. The target variable is the cost of the house (with values high and low). Given this scenario, indicate the choice of classifier for each of the following questions and give a brief explanation.
a) If the realtor wants a model that not only performs well but is also easy to interpret, which one would you choose between SVM, Decision Trees and kNN?
b) If you had to choose between RIPPER and Decision Trees, which one would you prefer for a classification problem where there are missing values in the training and test data?
c) If you had to choose between RIPPER and KNN, which one would you prefer if it is known that there are very few houses that have high cost?
Answer:
a. decision trees
b. decision trees
c. rippers
Explanation:
a) I will choose Decision trees because these can be better interpreted compared to these other two KNN and SVM. using Decision tress gives us a better explanation than the other 2 models in this question.
b) In a classification problem with missing values, Decision trees are better off rippers since Rippers avoid the missing values.
c) Ripper are when we know some are high cost houses.
How many different values can a bit have?
16
2
4.
8
Answer:
A bit can only have 2 values
Write a function called 'game_of_eights()' that accepts a list of numbers as an argument and then returns 'True' if two consecutive eights are found in the list. For example: [2,3,8,8,9] -> True. The main() function will accept a list of numbers separated by commas from the user and send it to the game_of_eights() function. Within the game_of_eights() function, you will provide logic such that: the function returns True if consecutive eights (8) are found in the list; returns False otherwise. the function can handle the edge case where the last element of the list is an 8 without crashing. the function prints out an error message saying 'Error. Please enter only integers.' if the list is found to contain any non-numeric characters. Note that it only prints the error message in such cases, not 'True' or 'False'. Examples: Enter elements of list separated by commas: 2,3,8,8,5 True Enter elements of list separated by commas: 3,4,5,8 False Enter elements of list separated by commas: 2,3,5,8,8,u Error. Please enter only integers.
Answer:
In Python:
def main():
n = int(input("List items: "))
mylist = []
for i in range(n):
listitem = input(", ")
if listitem.isdecimal() == True:
mylist.append(int(listitem))
else:
mylist.append(listitem)
print(game_of_eights(mylist))
def game_of_eights(mylist):
retVal = "False"
intOnly = True
for i in range(len(mylist)):
if isinstance(mylist[i],int) == False:
intOnly=False
retVal = "Please, enter only integers"
if(intOnly == True):
for i in range(len(mylist)-1):
if mylist[i] == 8 and mylist[i+1]==8:
retVal = "True"
break
return retVal
if __name__ == "__main__":
main()
Explanation:
The main begins here
def main():
This gets the number of list items from the user
n = int(input("List items: "))
This declares an empty list
mylist = []
This iterates through the number of list items
for i in range(n):
This gets input for each list item, separated by comma
listitem = input(", ")
Checks for string and integer input before inserting item into the list
if listitem.isdecimal() == True:
mylist.append(int(listitem))
else:
mylist.append(listitem)
This calls the game_of_eights function
print(game_of_eights(mylist))
The game_of_eights function begins here
def game_of_eights(mylist):
This initializes the return value to false
retVal = "False"
This initializes a boolean variable to true
intOnly = True
This following iteration checks if the list contains integers only
for i in range(len(mylist)):
If no, the boolean variable is set to false and the return value is set to "integer only"
if isinstance(mylist[i],int) == False:
intOnly=False
retVal = "Please, enter only integers"
This is executed if the integer contains only integers
if(intOnly == True):
Iterate through the list
for i in range(len(mylist)-1):
If consecutive 8's is found, update the return variable to True
if mylist[i] == 8 and mylist[i+1]==8:
retVal = "True"
break
This returns either True, False or Integer only
return retVal
This calls the main method
if __name__ == "__main__":
main()
Ask the user to input their grade percentage (e.g. the use will enter 98 if they had an overall grade of 98% in their course) for their Accounting, Marketing, Economics and MIS courses. Assume each course is worth 3 credit hours. Once you have all of their grades output what letter grade they earned for each course (e.g. Your letter grade for {Accounting/Marketing/whichever one you are outputting} is {A/B/C/D/F}). After you have output all of their letter grades, output their overall GPA for the semester using the formula:
Letter Grade Point Value for Grade
A 4.00
B 3.00
C 2.00
D 1.00
F 0.00
Example Student Transcript
Course Credit Hours Grade Grade Points
Biology 5 A 20
Biology Lab 1 B 3
English 5 C 10
Mathematics 5 F 033
16 Total Credits Attempted 33 Total Grade Points
Total Points Earned/Total Credits Attempted = Grade Point Average
33 Points Earned/16 Credits Attempted = 2.06 GPA
For more details on how to calculate your GPA, go to http://academicanswers.waldenu.edu/faq/73219 e
GPA - Convert MIS grade to letter grade using a conditional statement
GPA - Convert Accounting letter grade to points earned (can be done in same conditional as letter grade
GPA - Convert Marketing letter grade to points earned (can be done in same conditional as letter grade)
GPA-Convert Economics letter grade to points earned (can be done in same conditional as letter grade)
GPA-Convert MIS letter grade to points earned (can be done in same conditional as letter grade) GPA - Calculate the GPA
GPA-Output the letter grade for each course
GPA-Output the overall GPA for the semester
Answer:
In Python
def getpointValue(subject):
if subject >= 75: point = 4; grade = 'A'
elif subject >= 60: point = 3; grade ='B'
elif point >= 50: point = 2; grade = 'C'
elif point >= 40: point = 1; grade = 'D'
else: point = 0; grade = 'F'
return point,grade
subjects= ["Accounting","Marketing","Economics","MIS"]
acct = int(input(subjects[0]+": "))
mkt = int(input(subjects[1]+": "))
eco = int(input(subjects[2]+": "))
mis = int(input(subjects[3]+": "))
acctgrade = getpointValue(acct)
print(subjects[0]+" Grade: "+str(acctgrade[1]))
mktgrade = getpointValue(mkt)
print(subjects[1]+" Grade: "+str(mktgrade[1]))
ecograde = getpointValue(eco)
print(subjects[2]+" Grade: "+str(ecograde[1]))
misgrade = getpointValue(mis)
print(subjects[3]+" Grade: "+str(misgrade[1]))
totalpoint = (acctgrade[0] + mktgrade[0] + ecograde[0] + misgrade[0]) * 3
gpa = totalpoint/12
print("GPA: "+str(gpa))
Explanation:
The solution I provided uses a function to return the letter grade and the point of each subject
I've added the explanation as an attachment where I used comment to explain difficult lines
Select the correct answer.
David gets a new job as a manager with a multinational company. On the first day, he realizes that his team consists of several members from diverse cultural backgrounds. What strategies might David use to promote an appreciation of diversity in his team?
A.
Promote inclusion, where he can encourage members to contribute in discussions.
B.
Create task groups with members of the same culture working together.
C.
Allow members time to adjust to the primary culture of the organization.
D.
Provide training on the primary culture to minority groups only if there are complaints against them.
Answer:
A.
Explanation:
If we were to go with B, then it would exclude others from different cultures, doing what he is trying to.
If we went with C, then they wouldn't get along very well, because no one likes to be forced into a different religion.
If we went with D, he wants an appreciation, so training some people to change religions if there are complaints, is not going to cut it. Therefore, we have A. Which I do not need to explain.
Charging current being returned to the battery is always measured in DC Amps. true or false
Answer:Charging current being returned to the battery is always measured in DC Amps. Electrical energy will always flow from an area of low potential to an area of high potential. ... One volt is the pressure required to force one amp of current through a circuit that has 1 Ohm of resistance.
Explanation:
An expression that returns a value is known as a
Answer:
In computer programming, a return statement causes execution to leave the current subroutine and resume at the point in the code immediately after the instruction which called the subroutine, known as its return address. The return address is saved by the calling routine, today usually on the process's call stack or in a register. Return statements in many languages allow a function to specify a return value to be passed back to the code that called the function.
An expression that returns a value is known as a function. Check more about function below.
What is a function?A function is often seen as a kind of expression or rule, or law that often tells more about a relationship.
Conclusively, a function is known to often returns a value back to the instruction that is known also to be the function. This is regarded as the differences that exist between a method and a function.
Learn more about function from
https://brainly.com/question/20476366
Dr. Smith is teaching IT 102 and wants to determine the highest grade earned on her midterm exam. In Dr. Smith's class, there are 28 students. Midterm exam grades fall in the range of 0 to 100, inclusive of these values. Write a small program that will allow Dr. Smith to enter grades for all of her students, determine the highest grade, and output the highest grade.
Answer:
mysql
Explanation:
try building mysql database
2. What is the implication of media killings in the Philippines?
Answer:
Throughout the clarification below, the description of the query is mentioned.
Explanation:
In the Philippines, the Implication of media indicates that perhaps the Philippines isn't a safe environment for reporters, and therefore more remains to be improved to change this pattern.But it didn't start underneath Duterte before you could even say that, as well as he didn't order strikes. If he had instructions in which he would criticize, for perhaps a long period presently Ressa had died as one of his other very resolute and influential media commentators.There is a file of a few Sean Connery movies on the internet. Each entry has the following form:
Name of Movie
Release Date
Running Time (maybe)
Several names of some of the stars
A separator line (except after the last movie)
Your assignment is: for each movie,
1. read in the Name, Release Date, the stars
2. Sort the movies by Movie Name alphabetically,
2. Sort the stars alphabetically, by last name
3. Print the Movie Name, Release Date, Running Time (if there) and Print the list of stars (alphabetically, by last name).
Click here to see the Input File
Some Sample Output:
Darby O'Gill and the Little People
1959
RT 93 minutes
Sean Connery
Walter Fitzgerald
Kieron Moore
Janet Munro
Jimmy O'Dea
Albert Sharp
Estelle Winwood
Answer:
filename = input("Enter file name: ")
movie_container = list()
with open(filename, "r") as movies:
content = movies.readlines()
for movie in content:
holder = movie.split("\t")
movie_container.append((holder[0], holder[1], holder[2], holder[3]))
movie_container = sorted(movie_container, key= lambda movie: movie[0])
for movie in movie_container:
movie_stars = movie[3].split(",")
name_split = [names.split(" ") for names in movie_stars]
movie_stars.clear()
name_split = sorted(name_split, key= lambda names: names[1])
for name in name_split:
full_name = " ".join(name)
print( full_name)
movie_stars.append(full_name)
movie[3] = movie_stars
print(movie_container)
Explanation:
The python code uses the open function to open and read in the input file from the standard user prompt. The title of the movies and the stars are all sorted alphabetically and display at the output.
Question #3..plz help
In cell 14, calculate
the profit by
subtracting the
donation from the
streaming revenues.
Answer:
See Explanation
Explanation:
The question is incomplete as the cells that contains donation and streaming revenues are not given
So, I will make the following assumption:
H4 = Donations
G4 = Streaming Revenues
So, the profit will be:
Enter the following formula in cell I4
=(G4 - H4)
To get the actual solution in your case, replace G4 and H4 with the proper cell names
Look at the following assignment statements:
word1 = "rain"
word2 = "bow"
What is the correct way to concatenate the strings?
1 newWord = word1 == word2
2 newWord = word1 + word2
3 newWord = word1 * word2
4 newWord = word1 - word2
Answer: number 2 is the correct way to do it
Explanation:
Answer:
2 newWord = word1 + word2
Explanation:
Write a program that takes a list of integers as input. The input begins with an integer indicating the number of integers that follow. You can safely assume that the number of integers entered is always less than or equal to 10. The program then determines whether these integers are sorted in the ascending order (i.e., from the smallest to the largest). If these integers are sorted in the ascending order, the program will output Sorted; otherwise, it will output Unsorted
Answer:
is_sorted = True
sequence = input("")
data = sequence.split()
count = int(data[0])
for i in range(1, count):
if int(data[i]) >= int(data[i+1]):
is_sorted = False
break
if is_sorted:
print("Sorted")
else:
print("Unsorted")
Explanation:
*The code is in Python.
Initialize a variable named is_sorted as True. This variable will be used as a flag if the values are not sorted
Ask the user to enter the input (Since it is not stated, I assumed the values will be entered in one line each having a space between)
Split the input using split method
Since the first indicates the number of integers, set it as count (Note that I converted the value to an int)
Create a for loop. Inside the loop, check if the current value is greater than or equal to the next value, update the is_sorted as False because this implies the values are not sorted (Note that again, I converted the values to an int). Also, stop the loop using break
When the loop is done, check the is_sorted. If it is True, print "Sorted". Otherwise, print "Unsorted"
How many thermal performance control modes are there in Alienware Area 51m to support different user scenarios?
Answer:
3
Explanation:
The Dell Alienware Personal Computers refers to a range of PC's which are known for their strength, durability and most commonly their graphical performance. Th ecomputwrs are built to handle very high and intensive graphic demanding programs including gaming. The Alienware area 51m is a laptop which has been loaded with the capability and performance of a high graphic demanding desktop computers boasting massive memory size and greater graphic for better game play and high graphic demanding programs.
The laptop features an improved thermal and performance capability to handle the effect of different graphic demanding programs. Therfore, the laptop has 3 different thermal a d performance system modes which altenrtes depending on graphic demands in other to handle intensive demands.
It should be noted that the number of thermal performance mode is 5.
From the complete information, it should be noted that there are five thermal performance control modes are there in Alienware Area 51m to support different user scenarios.
The modes are:
Full speed mode.Performance mode.Balanced mode.Quiet mode.Cool mode.In conclusion, the correct option is 5
Learn more about modes on:
https://brainly.com/question/25604446
Which feature in Access is used to control data entry into database tables to help ensure consistency and reduce errors?
O subroutines
O search
O forms
O queries
The answer is: Forms
To control data entry into database tables to help ensure consistency and reduce errors will be known as forms in data entry.
What are forms in data entry?A form is a panel or panel in a database that has many fields or regions for data input.
To control data entry into database tables to help ensure consistency and reduce errors will be forms.
Then the correct option is C.
More about the forms in data entry link is given below.
https://brainly.com/question/10268767
#SPJ2
We can easily improve the formula by approximating the area under the function f(x) by two equally-spaced trapezoids. Derive a formula for this approximation and implement it in a function trapezint2( f,a,b ).
Answer:
Explanation:
[tex]\text{This is a math function that is integrated using a trapezoidal rule } \\ \\[/tex]
[tex]\text{import math}[/tex]
def [tex]\text{trapezint2(f,a,b):}[/tex]
[tex]\text{midPoint=(a+b)/2}[/tex]
[tex]\text{return .5*((midPoint-a)*(f(a)+f(midPoint))+(b-midPoint)*(f(b)+f(midPoint)))}[/tex]
[tex]\text{trapezint2(math.sin,0,.5*math.pi)}[/tex]
[tex]0.9480594489685199[/tex]
[tex]trapezint2(abs,-1,1)[/tex]
[tex]1.0[/tex]
In this exercise we have to use the knowledge of computational language in python to write the code.
the code can be found in the attachment.
In this way we have that the code in python can be written as:
h = (b-a)/float(n)
s = 0.5*(f(a) + f(b))
for i in range(1,n,1):
s = s + f(a + i*h)
return h*s
from math import exp # or from math import *
def g(t):
return exp(-t**4)
a = -2; b = 2
n = 1000
result = Trapezoidal(g, a, b, n)
print result
See more about python at brainly.com/question/26104476
As the network engineer, you are asked to design a plan for an IP subnet that calls for 25 subnets. The largest subnet needs a minimum of 750 hosts. Management requires that a single mask must be used throughout the Class B network. Which of the following lists a private IP network and mask that would meet the requirements?
a. 172.16.0.0 / 255.255.192.0
b. 172.16.0.0 / 255.255.224.0
c. 172.16.0.0 / 255.255.248.0
d. 172.16.0.0 / 255.255.254.0
Answer:
c. 172.16.0.0 / 255.255.248.0
Explanation:
The address will be 172.16.0.0 while the netmask will be 255.255.248.0.
Thus, option C is correct.
Which of the following are features of the HTTPS protocol?
Answer:
All traffic is encrypted. No one on your network can see what is going on (except for knowing where those packets are going to).
The identity of the remote server can be verified using certificates. So you also know that it really is your bank that you are talking to.
Optionally (and not in wide-spread use), the identity of the client can also be verified using certificates. This would allow for secure login to a site using chip cards instead of (or in addition to) password
Hyper Text Transfer Protocol (HTTP) and Secure HTTP are the same protocol from a standpoint of passing or blocking them with a firewall is false.
What are HTTP's (Hyper Text Transfer) fundamental features?Basic HTTP (Hyper Text Transfer) is the Characteristics. It has the protocol that has enables communication in between web browsers and the servers. It has the protocol for the requests and answers. By default, it connects to the secure TCP connections on port 80.
Hypertext Transfer Protocol Secure (HTTPS) is an add-on to the Hypertext Transfer Protocol. It has been used for safe communication over a computer network and is widely used on the Internet. In HTTPS, the transmit protocol is encrypted using Transport Layer Security(TLS) or, formerly, Secure Sockets Layer(SSL).
The difference between HTTPS uses TLS (SSL) to encrypt normal HTTP requests and responses. HTTPS is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website.
Learn more about HTML files on:
https://brainly.com/question/10663873
#SPJ3
Consider a memory-management system based on paging. The total size of the physical memory is 2 GB, laid out over pages of size 8 KB. The logical address space of each process has been limited to 256 MB. a. Determine the total number of bits in the physical address. b. Determine the number of bits specifying page replacement and the number of bits for page frame number. c. Determine the number of page frames. d. Determine the logical address layout.
Answer:
A. 31 bits
B. 13 bits, 18 bits
C. 256k
Explanation:
A.
We have total size of physical memory as 2gb
This means that 2¹ x 2³⁰
Using the law of indices,
= 2³¹
So physical address is equal to 31 bits
B.
We get page size = 8kb = 2³
1 kb = 2¹⁰
2³ * 2¹⁰ = 2¹³
So page replacement = 13 bits
Page frame number
= physical address - replacement bits
= 31 - 13
= 18 bits
C.
The number of frames is given as
2¹⁸ = 2⁸ x 2¹⁰ = 256K
So number of frames = 256K
D
Logical add space is 256K
Page size= physical pages = 8kb
Logical address layout= 28biys
Page number = 15 bits
Displacement = 12 bits
256k/8k = 32 pages in address space process
Which of these are examples of how forms are
used? Check all of the boxes that apply.
to input patient information at a doctor's office
O to store thousands of records
to check out books from a library
to choose snacks to buy from a vending
machine
Answer:to input patient information at a doctors office
To check out books from a library
To choose snacks to buy from a vending machine
Explanation:
A. To input patient information at a doctor's office, C. To check out books from a library, and D. To choose snacks to buy from a vending machine are examples of how forms are used. Therefore option A, C and D is correct.
Forms are used in various settings and scenarios to collect and manage data efficiently.
In option A, forms are utilized at doctor's offices to input and record patient information, streamlining the registration and medical history process.
In option C, library check-out forms help manage book borrowing, recording details like due dates and borrower information. Option D showcases how vending machines use forms to present snack options, allowing users to make selections conveniently.
All these examples demonstrate the versatility of forms as tools for data collection, organization, and user interaction, contributing to smoother operations and improved user experiences in different domains.
Therefore options A To input patient information at a doctor's office, C To check out books from a library, and D To choose snacks to buy from a vending machine are correct.
Know more about vending machines:
https://brainly.com/question/31381219
#SPJ5
Do any of these algorithms (Random Allocation, Round-Robin, Weighted Round-Robin, Round-Robin DNS Load Balancing, and Least Connections) compromise security?
Answer:
yes and
Explanation:
why do you need to know about a buildings security are you going to rob it ???
In a database table, the category of information is called ______________
Question 2 options:
Record
Tuple
Field
None of the above
Answer:
the answer is A.) A record
Explanation:
In database, the category of information is A. Record.
What is a database?A database simply means the collection of information that can be accessed in future. This is important to safeguard the information.
In this case, in a database table, the category of information is called a record. This is vital to keep documents.
Learn more about database on:
https://brainly.com/question/26096799