Answer:
backstage view
Explanation:
Prepare a document to list down at least 10 features/operations (on process and thread) you can do using Process Explorer.
Answer:
The operations that can be carried out using process explorer include but are not limited to:
Explanation:
Killing a Process TreeEnding or terminating a processSuspending a processExamining which process has locked a fileManually detecting a virusUnhiding a process. This can help to callup the window for a process that is not visible under normal explorer activitiesMonitor CPU usage setting the priority of a processchanging a service process's access securityMonitoring Graphics Processing Unit
Cheers
describe how sodium ammonium chloride can be separated from a solid mixture of ammonium chloride and anhydrous calcium chloride
Answer:
There are way in separating mixtures of chlorides salts such as that of sodium chloride and ammonium chloride. It can be done by crystallization, filtration or sublimation. If we want to separate the mixture, we have to heat up to 330-350 degrees Celsius and collect the gas that will be produced.
Need help with 9.2 Lesson Practice edhesive asap please
Answer:
Can you add an attachment please
In this exercise we have to use the computer language knowledge in python, so the code is described as:
This code can be found in the attached image.
So the code can be described more simply below, as:
height = []
height.append([16,17,14])
height.append([17,18,17])
height.append([15,17,14])
print(height)
See more about python at brainly.com/question/26104476
Suppose the program counter is currently equal to 1700 and instr represents the instruction memory. What will be the access of the next instruction if:
instr[PC] = add $t0, $t1, $t2
Answer:
C
Explanation:
omputer chip
sorry btw
The Basic premise of____is that objects can be tagged, tracked, and monitored through a local network, or across the Internet.
The basic premise of
a. artificial intelligence
b. intelligent workspaces
c. the Internet of Things
d. the digital divide
Answer:
C.
Explanation:
Internet of things
The Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.
What is IoT?The term "Internet of things" refers to actual physical items that have sensors, computing power, software, and other innovations and can link to those other systems and gadgets via the Internet or other communication networks and share files with them.
As we know,
Using a local network or the Internet, things may be identified, tracked, and monitored is the fundamental tenet of the Internet of Things.
Thus, the Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.
Learn more about the IoT here:
https://brainly.com/question/25703804
#SPJ2
The following table describes the required fields for two classes and typical values stored in those fields.
You are required to create a base class Printer and its child class PrinterCumScanner. Each of these classes should have user defined constructor and overridden Display() method so that the following test driver can work properly.
Answer:
hope this helps,if it did pls mark my ans as brainliest
Explanation:
using System;
class Printer{ string companyName; int pagesOutput;
double price;
public Printer(string companyName,int pagesOutput,double price){
this.companyName=companyName; this.pagesOutput=pagesOutput; this.price=price;
}
public virtual void Display(){ Console.WriteLine("companyName: "+companyName+" pagesOutput: "+pagesOutput+" price: "+price);
}
}
class PrinterCumScanner:Printer{ int imageDpi;
public PrinterCumScanner(string companyName,int pagesOutput,double price,int imageDpi):base(companyName,pagesOutput,price){ this.imageDpi=imageDpi; }
public override void Display(){ base.Display(); Console.WriteLine("imageDpi: "+imageDpi);
}
}
public class Program { static void Main(string[] args) { const int NUM_PRINTERS=3;
Printer []stock=new Printer[NUM_PRINTERS];
stock[0]=new Printer("HP",40,89.50);
stock[1]=new PrinterCumScanner("HP",40,215.0,320); stock[2]=new PrinterCumScanner("Cannon",30,175.0,240);
foreach(Printer aPrinter in stock){ aPrinter.Display();
}
}
}
A large hotel needs a program to store information about rooms at the hotel. Each of the rooms will be represented by an object which will store the number of beds in the room, and whether the room has a bath. Some rooms at the hotel are suites, in which case in addition to the information above they also need to store the number of sub-rooms in the suite. Which of the following is the best object-oriented program design?
a. Create a Suite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms .Create a subclass Room of Suite which wil inherit the instance variables numBeds and hasBath from Room, but not the instance variable int numSubrooms
b. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a subclass Suite of Room which will inherit the Instance variables of Room and has an additional instance variable int numSubrooms.
c. Create each of the following as separate classes, Room. Beds, Bath, Suite, SubRoom Create a single Roomor Suite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms.
d. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a separate class Suite with the instance variable int numSubrooms
b. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a subclass Suite of Room which will inherit the Instance variables of Room and has an additional instance variable int numSubrooms.
Explanation:
In object-oriented program designs, applications are split into sub-tasks and each sub-task is designed by creating as one or more classes to model it. This allows for flexibility and extensibility among other things.
In the case of the large hotel, two classes are of utmost importance:
i. the Room class to hold information about the number of beds in the room and whether or not the room has a bath.
ii. the Suite class to hold, in addition to the information held by the Room class, information about the number of sub-rooms in the suite.
To apply the concept of object-oriented design, since the suite is a special type of room, the Room class will serve as the super class while the Suite class which contains extra information will serve as the subclass inheriting all the properties of the Room class. Therefore the Suite will have all the properties of the Room and also its own special property - number of sub-rooms in this case.
Annapurno
Page
Date
corite
a programe to input length and the
breath of the rectangle and cliculate the
anecan perimeter .write a program to input length and breadth of the rectangle and calculate the area and perimeter
Answer:
The program in Python is as follows:
Length = float(input("Length: "))
Width = float(input("Width: "))
Area = Length * Width
print("Area: ",Area)
Explanation:
This gets input for length
Length = float(input("Length: "))
This gets input for width
Width = float(input("Width: "))
This calculates the area
Area = Length * Width
This prints the calculated area
print("Area: ",Area)
What does getfenv() do?
Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.
Explanation: What this does it goes thourgh line of code in a particular order.
This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.
Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.
Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.
Answer: ummm, who knows
Explanation:
Create a C program with the following process synchronization behavior. This synchronization process continues forever. You need to provide your own signal handling functions in the Parent, Child 1, Child 2, and Child3, each printing out a message with the cumulative number of signals received.
Answer:
hope this helps,do consider giving brainliest
Explanation:
int main() {
int i,pid; printf("pid : %d \n",pid);
pid=fork();
printf("pid : %d \n",pid);
printf("\n");
if(pid==0) {
printf("Child starts\n");
for(i=0;i<5;i++) {
printf("i : %d\n",i);
printf("\n");
}
printf("Child ends\n");
}
else {
printf("\nBefore wait\n");
printf("getpid : %d\n",getpid());
pid=wait(0);
printf("\npid : %d\n",pid);
printf("After wait\n");
printf("Parent\n");
printf("getpid : %d\n",getpid());
}
}
Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a non-negative integer between 1 and 20 that is passed as a parameter from the command line (e.g. ./fact.sh 5). The result should be echoed to the screen as a single integer (e.g. 120).
NOTE: Do not include any other output, just output the single integer result.
Submit your code to the auto-grader by pressing Check-It!
NOTE: You can submit as many times as you want up until the due date.
Answer:
hope this helps
Explanation:
Circle class
private members
double radius
double xPos
double yPos
public members
double diameter()
get the diameter of the Circle. It returns a value, diameter.
double area()
calculate the area of the Circle
double circumference()
calculate the circumference of the circle
double getRadius()
returns the radius
double getX()
returns the xPos value
double getY()
returns the yPos value
void setX(double x)
sets xPos, no requirements
void setY(double y)
sets yPos, no requirements
double distanceToOrigin()
returns the distance from the center of the circle to the origin
HINT: Find out how to calculate the distance between two points and recall the origin is at (0,0)
bool insersect(const Circle& otherCircle)
Take another Circle by const reference (see more notes below)
Returns true if the other Circle intersects with it, false otherwise
bool setRadius(double r)
sets the radius to r and returns true if r is greater than zero, otherwise sets the radius to zero and returns false
Remember, you will need a header file (.h) and an implementation file (.cpp)
You'll also need to update your Makefile
NOTE: The Circle class should not do any input or output.
CircleDriver class
private members
Circle circ1;
Circle circ2;
void obtainCircles()
Talk with the user to obtain the positions and radii for two Circles from the user. Repeats prompts until the user gives valid values for the radii
It does not validate the values, but rather checks the return value from a call to Circle's setRadius method
void printCircleInfo()
Prints the following information about each of the Circles to the screen:
The location of the Circle's center (xPos, yPos), the distance from the origin, each area, circumference, diameter
Lastly print whether or not the two circles intersect
Sample output from printCircleInfo().
Information for Circle 1:
location: (0, 50.0)
diameter: 200.0
area: 31415.9
circumference: 628.318
distance from the origin: 50.0
Information for Circle 2:
location: (50.0, 0)
diameter: 200.0
area: 31415.9
circumference: 628.318
distance from the origin: 50.0
The circles intersect.
public membersvoid run()
run merely calls all the other methods. Here's your definition for run()
//This will go in your CircleDriver.cpp
void CircleDriver::run()
{
obtainCircles();
printCircleInfo();
}
main
Main does very little. In fact, here is your main:
int main()
{
CircleDriver myDriver;
myDriver.run();
return(0);
}
Answer:
What was the actual the question? I am confused.
Explanation:
6. Which of the following games will most likely appeal to a casual player?
a) Wii Sport
b) Contra
c) Farmville
d) Both A and C
Answer:
A
Explanation:
Wii sports is a good game for a casual player. :)
For this exercise, you are given the Picture class and the PictureTester class. The Picture class has two instance variables. You will need to finish the class by writing getter and setter methods for these two instance variables.
Then in the PictureTester class a Picture object has been created for you. You will need to update this object and then print using the getter methods you created.
public class Picture
{
private String name;
private String date;
public Picture(String theName, String theDate){
name = theName;
date = theDate;
}
// Add getter and setter methods here.
// method names should be:
// getName, setName, getDate, setDate
}
Answer:
hope this helps, do consider giving brainliest
Explanation:
public class Picture {
// two instance variables
private String name;
private String date;
// Parameterized constructor
public Picture(String name, String date) {
super();
this.name = name;
this.date = date;
}
/**
* return the name
*/
public String getName() {
return name;
}
/**
* param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* return the date
*/
public String getDate() {
return date;
}
/**
* param date the date to set
*/
public void setDate(String date) {
this.date = date;
}
}
----------------------------------------------------TESTER CLASS---------------------------------------------------------------------
package test;
public class PictureTester {
public static void main(String[] args) {
// TODO Auto-generated method stub
// creating Picture object (pic is the reference variable) and we are invoking the constructor by passing // values of name and date
Picture pic = new Picture("flower_pic", "28-04-2020");
// now we will first use get method
String name = pic.getName();
String date = pic.getDate();
// displaying the value fetched from get method
// value will be name - flower_pic and date - 28-04-2020
System.out.println("[ Name of the Picture - "+name+" and Date - "+date+" ]");
// now we will use set method to set the value of name and date and then display that value
// declaring two variable
String name1 = "tiger_pic";
String date1 = "28-03-2020";
//assigning those value using set method
pic.setName(name1);
pic.setDate(date1);
System.out.println("[ Name of the Picture - "+pic.getName()+" and Date - "+pic.getDate()+" ]");
}
}
Outlines help you visualize the slides and the points you will include on each slide.
False
True
Answer:
True
Explanation:
because it was correct
Write a piece of code that constructs a jagged two-dimensional array of integers named jagged with five rows and an increasing number of columns in each row, such that the first row has one column, the second row has two, the third has three, and so on. The array elements should have increasing values in top-to-bottom, left-to-right order (also called row-major order). In other words, the array's contents should be the following: 1 2, 3 4, 5, 6 7, 8, 9, 10 11, 12, 13, 14, 15
PROPER OUTPUT: jagged = [[1], [2, 3], [4, 5, 6], [7, 8, 9, 10], [11, 12, 13, 14, 15]]
INCORRECT CODE:
int jagged[][] = new int[5][];
for(int i=0; i<5; i++){
jagged[i] = new int[i+1]; // creating number of columns based on current value
for(int j=0, k=i+1; j jagged[i][j] = k;
}
}
System.out.println("Jagged Array elements are: ");
for(int i=0; i for(int j=0; j System.out.print(jagged[i][j]+" ");
}
System.out.println();
}
expected output:jagged = [[1], [2, 3], [4, 5, 6], [7, 8, 9, 10], [11, 12, 13, 14, 15]]
current output:
Jagged Array elements are:
1
2 3
3 4 5
....
Answer:
Explanation:
The following code is written in Java and it uses nested for loops to create the array elements and then the same for loops in order to print out the elements in a pyramid-like format as shown in the question. The output of the code can be seen in the attached image below.
class Brainly {
public static void main(String[] args) {
int jagged[][] = new int[5][];
int element = 1;
for(int i=0; i<5; i++){
jagged[i] = new int[i+1]; // creating number of columns based on current value
for(int x = 0; x < jagged[i].length; x++) {
jagged[i][x] = element;
element += 1;
}
}
System.out.println("Jagged Array elements are: ");
for ( int[] x : jagged) {
for (int y : x) {
System.out.print(y + " ");
}
System.out.println(' ');
}
}
}
Write a script called pow.sh that is located in your workspace directory to calculate the power of two integer numbers (e.g. a ^ b); where a and b are passed as parameters from the command line (e.g. ./pow.sh 2 3). The result should be echoed to the screen as a single integer (e.g. 8).
Answer:
#! /usr/bin/bash
echo $[$1**$2]
Explanation:
(a) The first line of the code is very important as it tells the interpreter where the bash shell is located on the executing computer.
To get this on your computer, simply:
1. open your command line
2. type the following command: which bash
This will return the location where the bash shell is. In this case, it returned
/usr/bin/bash
(b) The second line is where the actual arithmetic takes place.
The variables $1 and $2 in the square bracket are the first and second arguments passed from the command line. The ** operator raises the left operand (in this case $1) to the power of the second operand (in this case $2).
Then, the echo statement prints out the result.
(c) Save this code in a file named as pow.sh then run it on the command line.
For example, if the following is run on the command line: ./pow.sh 2 3
Then,
the first argument which is 2 is stored in $1 and;
the second argument which is 3 is stored in $2.
The arithmetic operator (**) then performs the arithmetic 2^3 which gives 8.
Mohammed needs to ensure that users can execute a query against a table but provide different values to the query each time it is run. Which option will achieve this goal?
parameter queries
dynamic queries
query joins
static queries
Answer:
the answer is B
Explanation:
Explain the five generations of computer
Answer:
1 First Generation
The period of first generation: 1946-1959. Vacuum tube based.
2 Second Generation
The period of second generation: 1959-1965. Transistor based.
3 Third Generation
The period of third generation: 1965-1971. Integrated Circuit based.
4 Fourth Generation
The period of fourth generation: 1971-1980. VLSI microprocessor based.
5 Fifth Generation
The period of fifth generation: 1980-onwards. ULSI microprocessor based.
The phrase "generation" refers to a shift in the technology that a computer is/was using. The term "generation" was initially used to describe different hardware advancements. These days, a computer system's generation involves both hardware and software.
Who invented the 5th generation of computers?The Japan Ministry of International Trade and Industry (MITI) launched the Fifth Generation Computer Systems (FGCS) initiative in 1982 with the goal of developing computers that use massively parallel computing and logic programming.
The generation of computers is determined by when significant technological advancements, such as the use of vacuum tubes, transistors, and microprocessors, take place inside the computer. There will be five computer generations between now and 2020, with the first one starting around 1940.
Earlier models of computers (1940-1956)Computers of the Second Generation (1956-1963)Computers of the Third Generation (1964-1971)Computers of the fourth generation (1971-Present)Computers of the fifth generationLearn more about generations of computers here:
https://brainly.com/question/9354047
#SPJ2
What type of system enables computer data to be stored in multiple locations and shared with multiple users simultaneously?
A. content delivery network
B. consumer delivery network
C. cloud storage
D. World Wide Web
Answer:
A
Explanation:
10.The front end side in cloud computing is
Answer:
The front end is the side the computer user, or client, sees. The back end is the "cloud" section of the system.
The front end includes the client's computer (or computer network) and the application required to access the cloud computing system.
Explanation:
can i have brainliest please
Write a function process_spec that takes a dictionary (cmap), a list (spec) and a Boolean variable (Button A) as arguments and returns False: if the spec has a color that is not defined in the cmap or if Button A was pressed to stop the animation Otherwise return True
Answer:
Explanation:
The following code is written in Python. The function takes in the three arguments and first goes through an if statement to check if Button A was pressed, if it was it returns False otherwise passes. Then it creates a for loop to cycle through the list spec and checks to see if each value is in the dictionary cmap. If any value is not in the dictionary then it returns False, otherwise, it returns True for the entire function.
def process_spec(cmap, spec, buttonA):
if buttonA == True:
return False
for color in spec:
if color not in cmap:
return False
return True
Define a class StatePair with two template types (T1 and T2), a constructor, mutators, accessors, and a PrintInfo() method. Three vectors have been pre-filled with StatePair data in main():vector> zipCodeState: ZIP code - state abbreviation pairsvector> abbrevState: state abbreviation - state name pairsvector> statePopulation: state name - population pairsComplete main() to use an input ZIP code to retrieve the correct state abbreviation from the vector zipCodeState. Then use the state abbreviation to retrieve the state name from the vector abbrevState. Lastly, use the state name to retrieve the correct state name/population pair from the vector statePopulation and output the pair.Ex: If the input is:21044the output is:Maryland: 6079602
Answer:
Here.Hope this helps and do read carefully ,you need to make 1 .cpp file and 1 .h file
Explanation:
#include<iostream>
#include <fstream>
#include <vector>
#include <string>
#include "StatePair.h"
using namespace std;
int main() {
ifstream inFS; // File input stream
int zip;
int population;
string abbrev;
string state;
unsigned int i;
// ZIP code - state abbrev. pairs
vector<StatePair <int, string>> zipCodeState;
// state abbrev. - state name pairs
vector<StatePair<string, string>> abbrevState;
// state name - population pairs
vector<StatePair<string, int>> statePopulation;
// Fill the three ArrayLists
// Try to open zip_code_state.txt file
inFS.open("zip_code_state.txt");
if (!inFS.is_open()) {
cout << "Could not open file zip_code_state.txt." << endl;
return 1; // 1 indicates error
}
while (!inFS.eof()) {
StatePair <int, string> temp;
inFS >> zip;
if (!inFS.fail()) {
temp.SetKey(zip);
}
inFS >> abbrev;
if (!inFS.fail()) {
temp.SetValue(abbrev);
}
zipCodeState.push_back(temp);
}
inFS.close();
// Try to open abbreviation_state.txt file
inFS.open("abbreviation_state.txt");
if (!inFS.is_open()) {
cout << "Could not open file abbreviation_state.txt." << endl;
return 1; // 1 indicates error
}
while (!inFS.eof()) {
StatePair <string, string> temp;
inFS >> abbrev;
if (!inFS.fail()) {
temp.SetKey(abbrev);
}
getline(inFS, state); //flushes endline
getline(inFS, state);
state = state.substr(0, state.size()-1);
if (!inFS.fail()) {
temp.SetValue(state);
}
abbrevState.push_back(temp);
}
inFS.close();
// Try to open state_population.txt file
inFS.open("state_population.txt");
if (!inFS.is_open()) {
cout << "Could not open file state_population.txt." << endl;
return 1; // 1 indicates error
}
while (!inFS.eof()) {
StatePair <string, int> temp;
getline(inFS, state);
state = state.substr(0, state.size()-1);
if (!inFS.fail()) {
temp.SetKey(state);
}
inFS >> population;
if (!inFS.fail()) {
temp.SetValue(population);
}
getline(inFS, state); //flushes endline
statePopulation.push_back(temp);
}
inFS.close();
cin >> zip;
for (i = 0; i < zipCodeState.size(); ++i) {
// TODO: Using ZIP code, find state abbreviation
}
for (i = 0; i < abbrevState.size(); ++i) {
// TODO: Using state abbreviation, find state name
}
for (i = 0; i < statePopulation.size(); ++i) {
// TODO: Using state name, find population. Print pair info.
}
}
Statepair.h
#ifndef STATEPAIR
#define STATEPAIR
#include <iostream>
using namespace std;
template<typename T1, typename T2>
class StatePair {
private:
T1 key;
T2 value;
public:
// Define a constructor, mutators, and accessors
// for StatePair
StatePair() //default constructor
{}
// set the key
void SetKey(T1 key)
{
this->key = key;
}
// set the value
void SetValue(T2 value)
{
this->value = value;
}
// return key
T1 GetKey() { return key;}
// return value
T2 GetValue() { return value;}
// Define PrintInfo() method
// display key and value in the format key : value
void PrintInfo()
{
cout<<key<<" : "<<value<<endl;
}
};
#endif
In this exercise we have to use the knowledge in computational language in C++ to write the following code:
We have the code can be found in the attached image.
So in an easier way we have that the code is
#include<iostream>
#include <fstream>
#include <vector>
#include <string>
#include "StatePair.h"
using namespace std;
int main() {
ifstream inFS;
int zip;
int population;
string abbrev;
string state;
unsigned int i;
vector<StatePair <int, string>> zipCodeState;
vector<StatePair<string, string>> abbrevState;
vector<StatePair<string, int>> statePopulation;
inFS.open("zip_code_state.txt");
if (!inFS.is_open()) {
cout << "Could not open file zip_code_state.txt." << endl;
return 1;
}
while (!inFS.eof()) {
StatePair <int, string> temp;
inFS >> zip;
if (!inFS.fail()) {
temp.SetKey(zip);
}
inFS >> abbrev;
if (!inFS.fail()) {
temp.SetValue(abbrev);
}
zipCodeState.push_back(temp);
}
inFS.close();
inFS.open("abbreviation_state.txt");
if (!inFS.is_open()) {
cout << "Could not open file abbreviation_state.txt." << endl;
return 1;
}
while (!inFS.eof()) {
StatePair <string, string> temp;
inFS >> abbrev;
if (!inFS.fail()) {
temp.SetKey(abbrev);
}
getline(inFS, state);
getline(inFS, state);
state = state.substr(0, state.size()-1);
if (!inFS.fail()) {
temp.SetValue(state);
}
abbrevState.push_back(temp);
}
inFS.close();
inFS.open("state_population.txt");
if (!inFS.is_open()) {
cout << "Could not open file state_population.txt." << endl;
return 1;
}
while (!inFS.eof()) {
StatePair <string, int> temp;
getline(inFS, state);
state = state.substr(0, state.size()-1);
if (!inFS.fail()) {
temp.SetKey(state);
}
inFS >> population;
if (!inFS.fail()) {
temp.SetValue(population);
}
getline(inFS, state);
statePopulation.push_back(temp);
}
inFS.close();
cin >> zip;
for (i = 0; i < zipCodeState.size(); ++i) {
}
for (i = 0; i < abbrevState.size(); ++i) {
}
for (i = 0; i < statePopulation.size(); ++i) {
}
}
Statepair.h
#ifndef STATEPAIR
#define STATEPAIR
#include <iostream>
using namespace std;
template<typename T1, typename T2>
class StatePair {
private:
T1 key;
T2 value;
public:
StatePair()
{}
void SetKey(T1 key)
{
this->key = key;
}
void SetValue(T2 value)
{
this->value = value;
}
T1 GetKey() { return key;}
T2 GetValue() { return value;}
void PrintInfo()
{
cout<<key<<" : "<<value<<endl;
}
};
See more about C code at brainly.com/question/19705654
What is the result of executing the following code? You can assume the code compiles and runs. #include using namespace std; void factorial(int n) { cout << n << '*'; factorial(n-1); } int main() { factorial(4); return 0; }
Answer:
The result of executing the code is 24.
Explanation:
Factorial of a number:
The factorial of a number is the multiplication of a number by all it's previous numbers until one. For example:
0! = 1
1! = 1
2! = 2*1 = 2
3! = 3*2*1 = 6
4! = 4*3*2*1 = 24
In this question:
This is a C++ code, which is a recursive function to calculate a factorial of a number.
The input, given by factorial(4), is 4, so the result of executing the code is 24.
cout << n << '*'; factorial(n-1);
This means for each input, until n = 1, the output is the factorial of the number. This is the recursive function.
Identify the following terms being described. Write your answers on the space provided.
1. Worldwide Web
______________________
2.E-mail
________________________
3.Powerline networking
_______________________
5.Cable
_______________________
Answer:
Find answers below.
Explanation:
1. Worldwide Web: In computing, WWW simply means World Wide Web. The world wide web was invented by Sir Tim Berners-Lee in 1990 while working with the European Council for Nuclear Research (CERN); Web 2.0 evolved in 1999. Basically, WWW refers to a collection of web pages that are located on a huge network of interconnected computers (the Internet). Also, users from all over the world can access the world wide web by using an internet connection and a web browser such as Chrome, Firefox, Safari, Opera, etc.
In a nutshell, the World Wide Web is an information system that is generally made up of users and resources (documents) that are connected via hypertext links.
2.E-mail: An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send and receive texts and multimedia messages over the internet.
It is considered to be one of the most widely used communication channel or medium is an e-mail (electronic mail).
3. Powerline networking: this is a wired networking technology that typically involves the use of existing electrical cables in a building to connect and transmit data on network devices through powerline network adapters.
4. Cable: this include network cables such as CAT-5, CAT-6 and fiber optic cables used for connecting and transmitting signals between two or more network devices.
what is the output of this line of code?
print("hello"+"goodbye")
-"hello"+"goodbye"
-hello + goodbye
-hello goodbye
-hellogoodbye
Answer:
“hello” + “goodbye”
Explanation:
Which tab can be used to change the theme and background style of a presentation?
O Design
O Home
O Insert
O View
Answer:
Design
Explanation:
seems the most correct one..
Two character strings may have many common substrings. Substrings are required to be contiguous in the original string. For example, photograph and tomography have several common substrings of length one (i.e., single letters), and common substrings ph, to, and ograph as well as all the substrings of ograph. The maximum common substring length is 6. Let X = X122 . Im and Y = yıy2 - - • Yn be two character strings. Using dynamic programming, design an algorithm to find the maximum common substring length for X and Y using dynamic programming. Please follow the general steps for designing a dynamic programming solution as in Q1 (other than the actual programming part).
Answer:
Explanation:
The following function is written in Java. It takes two strings as parameters and calculates the longest substring between both of them and returns that substring length.
import java.util.*;
class Test
{
public static void main(String[] args)
{
String X = "photograph";
String Y = "tomography";
System.out.println(X + '\n' + Y);
System.out.println("Longest common substring length: " + longestSub(X, Y));
}
static int longestSub(String X, String Y)
{
char[] word1 = X.toCharArray();
char[] word2 = Y.toCharArray();
int length1 = X.length();
int length2 = Y.length();
int substringArray[][] = new int[length1 + 1][length2 + 1];
int longestSubstringLength = 0;
for (int i = 0; i <= length1; i++)
{
for (int j = 0; j <= length2; j++)
{
if (i == 0 || j == 0)
substringArray[i][j] = 0;
else if (word1[i - 1] == word2[j - 1])
{
substringArray[i][j]
= substringArray[i - 1][j - 1] + 1;
longestSubstringLength = Integer.max(longestSubstringLength,
substringArray[i][j]);
}
else
substringArray[i][j] = 0;
}
}
return longestSubstringLength;
}
}
CHALLENGE ACTIVITY
1.6.1: Type casting: Computing average owls per zoo.
Assign avg_owls with the average owls per zoo. Print avg_owls as an integer.
Sample output for inputs: 1 2 4
Average owls per zoo: 2
-------------------------------------------------------------------
Someone please explain what I am doing wrong?
Answer:
avg_owls=0.0
num_owls_zooA = int(input())
num_owls_zooB = int(input())
num_owls_zooC = int(input())
num_zoos = 3
avg_owls = (num_owls_zooA + num_owls_zooB + num_owls_zooC) / num_zoos
print('Average owls per zoo:', int(avg_owls))
Explanation:
There is a problem while you are trying the calculate the average owls per zoo.
As you may know, in order to calculate the average, you need to get the total number of owls in all the zoos, then divide it to the number of zoos. That is why you need to sum num_owls_zooA + num_owls_zooB + num_owls_zooC and divide the result by num_zoos
Be aware that the average is printed as integer value. That is why you need to cast the avg_owls to an int as int(avg_owls)
14. Video game legend Shigeru Miyamoto designed all EXCEPT which of the following games?
a) Donkey Kong
b) Mario Bros
c) The Legend of Zelda
d) Pac-Man