Consider a DataFrame named df with columns named P2010, P2011, P2012, P2013, 2014 and P2015 containing float values. We want to use the apply method to get a new DataFrame named result_df with a new column AVG. The AVG column should average the float values across P2010 to P2015. The apply method should also remove the 6 original columns (P2010 to P2015). For that, what should be the value of x and y in the given code?
frames = ['P2010', 'P2011', 'P2012', 'P2013', 'P2014', 'P2015']
df['AVG'] = df[frames ].apply(lambda z: np.mean(z), axis=x)
result_df df.drop(frames, axis=y)
a. x = 1 y = 0.
b. x = 1 y = 1.
c. x = 0 y = 1.
d. x = 0 y = 0.
Answer:
x = 1 ; y = 1
Explanation:
The newly created AVG column will contain the mean value of all 6 columns(P2010, P2011, P2012, P2013, 2014 and P2015) this means that we are taking the mean across the columns as our AVG column have the same length as the initial lengtb of the data Frame as all a values in each index are averaged to create the new column. To achieve this the value 1 will be passed to the axis argument in the apply method.
To drop the previous 6 columns, we se the axis argument set to 1, this will delete the columns passed to the drop method.
Hence, both x and y values of the axis argument will take the value 1.
John downloaded the manual for his TV, called manual-of-tv.pdf, from the manufacturer's website. After he clicked twice on the document he was informed by Windows that the file could not be opened. Which software must John install to solve the problem?
Jhon must download third party pdf viewer softwares to open the .pdf file.
For example
Adobe Acrobat Reader
Must click thanks and mark brainliest
If we are transferring data from a mobile device to a desktop and receive an error message that the mobile device has stopped communicating with the desktop, what is most likely the root cause?
a. the physical head on the cable os not the correct type
b. one of the ports on either device is damaged or under powered
c. the computer is not running the correct application
d. cable is not the correct color
Answer should probably be B. I don’t think you’d need an application to transfer data, and the computer wouldn’t even tell you if the data couldn’t transfer if you have the wrong cable head. It wouldn’t even be connected.
The root cause at the time when transferring the data from mobile device to the computer is that the port on the device is either damaged or it is underpowered.
The following are not the root causes for the error message at the time of transferring the data from a mobile device to the computer:
The cable is not of accurate type.The computer does not run the right application.The cable is not of accurate color.Therefore we can conclude that the root cause at the time when transferring the data from a mobile device to the computer is that the port on the device is either damaged or it is underpowered.
Learn more about the data here: brainly.com/question/10980404
Code Example 17-1 class PayCalculator { private: int wages; public: PayCalculator& calculate_wages(double hours, double wages) { this->wages = hours * wages; return *this; } double get_wages() { return wages; } }; (Refer to Code Example 17-1.) What coding technique is illustrated by the following code? PayCalculator calc; double pay = calc.calculate_wages(40, 20.5).get_wages(); a. self-referencing b. function chaining c. dereferencing d. class chaining
Answer:
The answer is "Option b".
Explanation:
Function chaining is shown by this code, as the functions are called one after the other with one statement. Whenever you want to call a series of methods through an object, that technique is beneficial. Just because of that, you may give the same effect with less code and have a single given value only at top of the leash of operations.
how to not addUse methods to: 1. Get a String from the user at the command line 2. Populate an ArrayList of Character data (the wrapper class), with each char in the String represented as a separate Character element in the ArrayList 3. Output each Character to the command line, each on a separate line space into my array list
Answer:
Explanation:
The following code is written in Java. It asks the user to enter a string. Then the program loops through the string and separates the string into an ArrayList of characters. Finally, it outputs each character separately on a its own line.
import java.util.ArrayList;
import java.util.Scanner;
class Brainly {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a String: ");
String answer = in.nextLine();
ArrayList<Character> charsList = new ArrayList<>();
for (int i = 0; i < answer.length(); i++) {
charsList.add(answer.charAt(i));
}
for (char x: charsList) {
System.out.println(x);
}
}
}
Write the code for the following problem.
Add a function to problem to display the last name and highest, last name and lowest and average exam score. Hint: for highest initialize a variable to 0 (high_var). If the array value is higher than the high_var then set high_var to the array value and set high_index to the position of the array. Proceed through the array until you get to the end. Do the same for finding the lowest using low_var set to 999 (higher than the highest value). For the average score, sum all the exam scores as you proceed through the loop. Use a for loop to go through each occurrence of the arrays. Note you can do all this with one for loop but if it makes more sense to you to use multiple for loops that is ok too.
Answer:
no
Explanation:
Which statement is most likely to be true about a computer network?
A network can have several client computers and only one server.
A network has to have physical cables connecting the devices in the network.
A network can have several servers and only one client.
A network can consist of a single computer with no other devices in communication with that computer.
Which statement is most likely to be true about a computer network?
A network can have several client computers and only one server.
Explanation:
a network can have several client computers and only one server
Code Example 4-1 int limit = 0; for (int i = 10; i >= limit; i -= 2) { for (int j = i; j <= 1; ++j) { cout << "In inner for loop" << endl; } cout << "In outer for loop" << endl; } (Refer to Code Example 4-1.) How many times does "In inner for loop" print to the console? a. 1 b. 0 c. 2 d. 5 e. 7
Answer:
"In inner for loop" is printed twice.
Answer: C. 2
Explanation:
Code:
int main()
{
int limit = 0;
for (int i =0; i>=limit; i-=2) {
for (int j = i; j <= 1; ++j){
cout << "In inner for loop" << endl;
}
cout << "In outer for loop" << endl;
}
return 0;
}
Output:
In inner for loop
In inner for loop
In outer for loop
The output "In inner for loop" print twice.
Thus, option (c) is correct.
In the given code example, the inner for loop has a condition j <= 1.
This condition means that the loop will execute as long as j is less than or equal to 1.
However, the initial value of j is i, and the value of i decreases by 2 in each iteration of the outer for loop.
When i = 8, the inner loop has the condition j ≤ 1.
The loop will iterate as long as j is less than or equal to 1.
So the inner loop executes twice: once when j = 8, and then when j = 9. The statement "In inner for loop" prints twice.
Therefore, the output print twice.
Thus, option (c) is correct.
Learn more about Output problem here:
https://brainly.com/question/33184382
#SPJ4
A bot can use a _______to capture keystrokes on the infected machine to retrieve sensitive information.
Answer:
keylogger.
Explanation:
A keylogger can be defined as a software program or hardware device designed for monitoring and recording the keystrokes entered by an end user through the keyboard of a computer system or mobile device.
Basically, a keylogger can be installed as a software application or plugged into the USB port of a computer system, so as to illegally keep a record of all the inputs or keys pressed on a keyboard by an end user.
In order to prevent cyber hackers from gaining access to your keystrokes, you should install an anti-malware software application such as Avira, McAfee, Avast, Bitdefender, Kaspersky, etc.
An antivirus utility is a software application or program that's used to scan, detect, remove and prevent computer viruses such as Malware, Trojan horses, keyloggers, botnets, adwares etc.
In conclusion, a bot can use a keylogger to capture keystrokes on the infected machine to retrieve sensitive information.
10 features of the ribbon in microsoft word
Answer:yes
Explanation:
Yup
So, I need to use an external mic for my phone, but the problem is that I need a "dual mic adapter". My dad gave me an "audio splitter" instead. Can I use the audio splitter instead in order to connect the external mic to my phone???
But you can't use this device alone to connect two microphones to your USB C port and expect it to have usable volume. So the description is somewhat misleading ...
1.which screen appears after the password is typed (welcome, lock)
Answer:
it should be the welcome screen I will hope so lol
Answer:
welcomeyou don't know that much also
Write a program that lets a user enter N and that outputs N! (N factorial, meaning N*(N-1)*(N-2)*..\.\*2*1). Hint:Use a loop variable i that counts from total-1 down to 1. Compare your output with some of these answers: 1:1, 2:2, 3:6, 4:24, 5:120, 8:40320.
Answer:
The program is as follows:
num = int(input("Number: "))
fact = 1
for i in range(1,num+1):
fact*=i
print(fact)
Explanation:
This gets integer input from the user
num = int(input("Number: "))
This initializes factorial to 1
fact = 1
The following iteration calculates the factorial of the integer input
for i in range(1,num+1):
fact*=i
This prints the calculated factorial
print(fact)
3. Using Assume the following list of keys: 36, 55, 89, 95, 65, 75, 13, 62, 86, 9, 23, 74, 2, 100, 98 This list is to be sorted using the quick sort algorithm as discussed in this chapter. Use pivot as the middle element of the list. a. Give the resulting list after one call to the function partition. b. What is the size of the list that the function partition partitioned
Answer:
a. 36, 55, 13, 9, 23, 2, 62, 86, 95, 65,74, 75, 100, 98, 89
b. 15
Explanation:
Create union integer with members char c, short s, int i and long b. Write a program that inputs the values of type char, short, int, and long and stores the values in union variables of type union integer. Each union variable should be printed as a char, a short, an int and a long. D the values always print correctly? Also create pseodocode or flowchart.
Here is the feedback that I received when I originally turned this in:
I have the following concerns: You need to save your program file with a .c extension. You should declare your union above the main module and then utilize it from within this portion. You have declared the union and then created a function definition prior to entering the main() function.
Here is the original code provided by homework help: Thanks in advance
#include
union myUnion {
char c;
short s;
int i;
long l;
};
void print(myUnion u) {
printf("As a character: %c\n", u.c);
printf("As a short: %hd\n", u.s);
printf("As an int: %d\n", u.i);
printf("As a long: %ld\n\n", u.i);
}
int main() {
myUnion u;
printf("Please enter a character: ");
scanf("%c", &(u.c));
print(u);
printf("Please enter a short: ");
scanf("%hd", &(u.s));
print(u);
printf("Please enter an int: ");
scanf("%d", &(u.i));
print(u);
printf("Please enter a long: ");
scanf("%ld", &(u.l));
print(u);
return 0;
Answer:
The updated program in C is as follows:
#include <stdio.h>
union myUnion{ char c; short s; int i; long l; };
int main(){
union myUnion inputs;
printf("Character: "); scanf("%c", &inputs.c);
printf("Output: %c", inputs.c);
printf("\nShort: "); scanf("%hd", &inputs.s);
printf("Short: %hd", inputs.s);
printf("\nInteger: "); scanf("%d", &inputs.i);
printf("Output: %d", inputs.i);
printf("\nLong: "); scanf("%ld", &inputs.l);
printf("Long: %ld", inputs.l);
return 0;
}
The pseudocode is as follows:
Function union myUnion {
character; short; int; long
}
main() {
myUnion inputs;
Input inputs.c; Print inputs.c
Input inputs.s; Print inputs.s
Input inputs.i; Print inputs.i;
Input inputs.l; Print inputs.l
}
Explanation:
This defines the union function
union myUnion{ char c; short s; int i; long l; };
The main begins here
int main(){
This calls the union function to main
union myUnion inputs;
This prompts and gets input for character variable
printf("Character: "); scanf("%c", &inputs.c);
This prints the character input
printf("Output: %c", inputs.c);
This prompts and gets input for short variable
printf("\nShort: "); scanf("%hd", &inputs.s);
This prints the short input
printf("Short: %hd", inputs.s);
This prompts and gets input for integer variable
printf("\nInteger: "); scanf("%d", &inputs.i);
This prints the integer input
printf("Output: %d", inputs.i);
This prompts and gets input for long variable
printf("\nLong: "); scanf("%ld", &inputs.l);
This prints the long input
printf("Long: %ld", inputs.l);
return 0;
}
Kamal plans to offer new, more favorable contracts to business customers who are now receiving a discount and use wireless services. Determine whether each customer should receive a new contract as follows:
a. In cell 15, enter a formula using the AND function that tests whether the Wireless value is equal to "Y" and whether the Discount value is equal to "Y".
b. Fill the range 16:118 with the formula in cell 15.
Solution :
'AND" operation is a logical operation and is used in logical connective combining two statements and in truth tables.
Using AND operation verifies whether the outcome P and Q is true only when both the P as well as Q are true. If one of the P or Q is not true, then outcome result will be false.
In the context, Kamal wishes to offer a new and more favorable contracts to the business customers who use a wireless services and receive a discount.
Therefore, using the AND operation of the customers as :
Customer Wireless Discount Outcome
A N N FALSE
B Y N FALSE
C N Y FALSE
D Y Y TRUE
CONDUCT INTERVIEWS
Using your interview questions, interview at least three business professionals. Here are some useful tips for conducting the interviews:
Schedule an appointment for the interview for a time and place that is quiet and convenient.
Be on time and be prepared with paper and pen. You may also bring a recording device.
Be friendly and courteous; remember that the interviewee is giving you her valuable time!
Ask your questions clearly.
Don't interrupt!
Try to stay focused, but if something interesting comes up, go with it.
Take good notes. Ask the interviewee to repeat what she said if necessary, but only do this when it is something important.
Obtain all the information needed before ending the interview. If necessary, review your notes with the person.
Thank the interviewee for her time.
Write a description of the interviews in this text box.
Note that conducting a professional interview with business professionals is quite tasking and it does require skills and boldness,
Note that the questions that one need to ask are questions that are based on the field of those business professionals, the company, your background, their dreams and aspirations and as such one should not be personal about it.
What are the interview questions asked?The interview questions prepared were:
Do they have the skills, expertise, and experience to carry out the job?.Are they happy and interested in current job and the current firm they are working with?.Can I fit into their team, organization culture, and firm?. etc.Learn more about interview from
https://brainly.com/question/8846894
(viii) Word does not allow you to customize margins.
true/false:-
Which of these is a tool for creating mobile apps?
Appy Pie
C#
Apple Pie
C++
Answer:
C++
Explanation:
C++ is used in application development
How can a DevOps team take advantage of Artificial Intelligence (AI)?
Answer:
By using AI to collate data from multiple sources and assess existing automation to improve efficiency.
Artificial Intelligence is indeed a technique that allows machines to imitate the conduct of people. Machine Learning, even so, is an AI subset.
AI/ML could indeed help the creativity and innovation of DevOps team members by eradicating inefficient information. By their operations and maintenance life cycle and allowing the staff to collaborate on the quantity, speed, and variability of data. It could lead to automated improvements as well as improved productivity for the DevOps team.Therefore, By using AI, data from various sources is gathered and established automation is assessed to make it more efficient.
Learn more:
brainly.com/question/10054757
write a java program that prompts the user to enter scores (each number an integer from 0 to 10) and prints the following output: how many scores entered the highest score the lowest score the average of all the scores the average with the highest and lowest score not counted if the user enters less than 3 scores print an error message instead of the output above
Answer:
Explanation:
The following is written in Java. It continues asking the user for inputs until they enter a -1. Then it saves all the values into an array and calculates the number of values entered, the highest, and lowest, and prints all the variables to the screen. The code was tested and the output can be seen in the attached image below.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
class Brainly {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int count = 0;
int highest, lowest;
ArrayList<Integer> myArr = new ArrayList<>();
while (true) {
System.out.println("Enter a number [0-10] or -1 to exit");
int num = in.nextInt();
if (num != -1) {
if ((num >= 0) && (num <= 10)) {
count+= 1;
myArr.add(num);
} else {
System.out.println("Wrong Value");
}
} else {
break;
}
}
if (myArr.size() > 3) {
highest = myArr.get(0);
lowest = myArr.get(0);
for (int x: myArr) {
if (x > highest) {
highest = x;
}
if (x < lowest) {
lowest = x;
}
}
System.out.println("Number of Elements: " + count);
System.out.println("Highest: " + highest);
System.out.println("Lowest : " + lowest);
} else {
System.out.println("Number of Elements: " + count);
System.out.println("No Highest or Lowest Elements");
}
}
}
What is the relationship between an organization’s specific architecture development process and the Six-Step Process?
Answer:
It is a method of developing architecture in various stages
Explanation:
The organization-specific architecture developmental process is a tested and repeated process for developing architecture. It made to deal with most of the systems. It describes the initial phases of development. While the six step process is to define the desired outcomes, Endorse the process, establish the criteria and develop alternatives. Finally to document and evaluate the process.which of the statement is use to skip the loop and continue woth the next iteration ?
Answer:
C – continue statement with example. The continue statement is used inside loops. When a continue statement is encountered inside a loop, control jumps to the beginning of the loop for next iteration, skipping the execution of statements inside the body of loop for the current iteration.
Explanation:
PLS mark brainliest
hope it helped u
hi, please help me, solution.
Answer:
error: incompatible types
Explanation:
Given
The attached code
Required
The output
Variable "a" is declared as float
While p is declared as a pointer to an integer variable
An error of incompatible types will be returned on line 3, int *p = a;
Because the variables are not the same.
To assign a to p*, we have to use type casting.
Hence, (b) is correct
Which of the following computer component facilitates internet connection?
A. Utility system
B. Operating system
C. Application system
D. Performance system
Answer:
it should be operating system
Explanation:
I hope this right have an great day
The computer component that facilitates internet connection is the operating system. The correct option is B.
What is an internet connection?Internet connection is the connection of different computers together. This connection is wireless. Internet connects different computer system together and provides and transfer information. We use the internet for many uses. Today students used this for learning, with the internet companies from far countries can join together.
The operating system of the computer is the main part of the computer that operates all its functions. The operating system manages computer software, hardware, and resources.
The internet connection is also operated by the operating system for the computer. Internet is connected by a router of WiFi, and the wired internet has connected to a wire in the CPU.
Thus, the correct option is B. Operating system.
To learn more about internet connection, refer to the link:
https://brainly.com/question/28110846
#SPJ2
A hammer tool can only be used by one technician at a time to perform hitting. Accordingly, you have developed a Hammer class with a hit method. Objects of class Hammer are used to simulate different hammers, while threads are created to simulate users. Which situation needs to add the synchronized keyword to the hit method
Answer:
Explanation:
The synchronized keyword needs to be active on the hit method at any point where 2 or more threads (users) exists at any given moment. This is in order to prevent two or more users from trying to perform a hammer hit at the same time. This is what the synchronized keyword is used for. It prevents the more than one thread from calling the specific method at the same time. Instead it adds the action to a sequence so that the second thread calls the hit method only after the first thread's hit method finishes.
In the context of the components of a typical expert system, _____ is similar to a database, but in addition to storing facts and figures it keeps track of rules and explanations associated with facts.
Answer:
Knowledge base.
Explanation:
Artificial intelligence (AI) also known as machine learning can be defined as a branch of computer science which typically involves the process of using algorithms to build a smart computer-controlled robot or machine that is capable of performing tasks that are exclusively designed to be performed by humans or with human intelligence.
Artificial intelligence (AI) provides smarter results and performs related tasks excellently when compared with applications that are built using conventional programming.
Generally, there are two (2) main characteristics of artificial intelligence (AI) systems and these include;
I. Non-algorithmic processing.
II. Symbolic processing.
In artificial intelligence (AI), the field of expert systems is the most important applied area because it models human knowledge.
Hence, expert systems represents knowledge as a set of rules by mimicking the expertise of humans in a particular field to uniquely proffer solutions to a problem.
Although, all expert systems are generally lacking in human capabilities and can only use inference procedures to proffer solutions to specific problems that would normally require human expertise or competence.
Some of the areas where expert systems can be applied are; monitoring, diagnosis, scheduling, classification, design, process control, planning, etc.
Basically, expert systems comprises five (5) main components and these are;
1. Explanation module.
2. Inference Engine.
3. Knowledge acquisition and learning module.
4. User Interface.
5. Knowledge Base.
In the context of the components that makes up an expert system, knowledge base is similar to a database because it is used for storing facts and figures, while keeping track of rules and explanations associated with facts. Thus, giving rise to the knowledge base management system (KBMS).
In the context of the components of a typical expert system, Knowledge base is similar to a database, but in addition to storing facts and figures, it keeps track of rules and explanations associated with facts.
An expert system is a form of artificial intelligence where computer imitate the decision making style of humans.
There are basically two types of the expert system and they are the inference engine and the knowledge base.
The knowledge base consists of the facts and rules and ways of interpreting them to arise to new insights. The inference engine applies logical rules to the knowledge base.
Learn more about knowledge base here:
https://brainly.com/question/9619145
Write a program that inputs a line of text tokenizing the line with function strtok and outputs the tokens in reverse order i.e. last token in the sentence is printed first and first token is printed last. The user must be able to specify at most 80 characters in the sentence.
Answer and Explanation:
var gettext= prompt("please enter text");
function strtok(gettext){
var splitString = gettext.split("");
if(splitString.length<=80){
var reverseArray = splitString.reverse();
var joinArray = reverseArray.join("");
return joinArray;}
else{
Alert("too many characters");
}
}
/* we first ask for user input using the prompt function. We save this in a variable gettext which we pass to the strtok function. This function first splits the text and makes it an array so we are able to count how many characters the user enters and set an if..else condition to handle characters that may be more than 80. The reverse and join functions are then used respectively to reverse and return the string.*/
Management of software development consist of?
Chọn một:
a. Process
b. People
c. Project
d. All of the above
Answer:
d. All of the above
Explanation:
A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.
A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications.
In Computer science, management of software development consist of;
a. Process: it involves the stages through which a software application is analyzed, designed, developed, tested, etc.
b. People: it refers to the individuals involved in the software development process.
c. Project: it's the entirety of the stages a software goes through before it gets to the end user.
Write a program that uses linear recursion to generate a copy of an original collection in which the copy contains duplicates of every item in the original collection. Using linear recursion, implement a function that takes a list as user-supplied runtime input and returns a copy of it in which every list item has been duplicated. Given an empty list the function returns the base case of an empty list.
Answer: b
Explanation:
Program using linear recursion to duplicate items in a list:
def duplicate_list(lst):
if not lst:
return []
else:
return [lst[0], lst[0]] + duplicate_list(lst[1:])
# Example usage
user_input = input("Enter a list of items: ").split()
original_list = [item for item in user_input]
duplicated_list = duplicate_list(original_list)
print("Duplicated list:", duplicated_list)
How can a program use linear recursion to duplicate items in a list?By implementing a function that utilizes linear recursion, we can create a copy of an original list with duplicated items. The function duplicate_list takes a list lst as input and checks if it is empty. If the list is empty, it returns an empty list as the base case.
Otherwise, it combines the first item of the list with itself and recursively calls the function with the remaining items (lst[1:]). The duplicated items are added to the resulting list. This process continues until all items in the original list have been duplicated and the duplicated list is returned.
Read more about linear recursion
brainly.com/question/31313045
#SPJ2