Answer:
True
Explanation:
With the recent advancement in IT we have witnessed offline retail businesses begin to get online presence. The advancement of the e-commerce sector and the convenience that it brings to customers through providing the ability to make orders online and get goods delivered to their doorsteps in a short time, has brought about escalating growth in the online and in extension offline retail businesses.
Big retail chains such as Walmart are taking advantage of this to increase their sales. Also, online retail presence helps put offline businesses out there in terms of advertising and marketing.
Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If userValues is {2, 1, 2, 2} and matchValue is 2 , then numMatches should be 3.
Your code will be tested with the following values:
userValues: {2, 1, 2, 2}, matchValue: 2 (as in the example program above)
userValues: {0, 0, 0, 0}, matchValue: 0
userValues: {20, 50, 70, 100}, matchValue: 10
#include
using namespace std;
int main() {
const int NUM_VALS = 4;
int userValues[NUM_VALS];
int i;
int matchValue;
int numMatches = -99; // Assign numMatches with 0 before your for loop
cin >> matchValue;
for (i = 0; i < NUM_VALS; ++i) {
cin >> userValues[i];
}
/* Your solution goes here */
cout << "matchValue: " << matchValue << ", numMatches: " << numMatches << endl;
return 0;
}
Answer:
add new for each loop:
for (int i : userValues)
if(i == matchValue) numMatches++;
this goes through every userValue and check if it matches match Value.
if it does, then increment numMatches.
Write a program that asks the user for three strings. Then, print out whether the first string concatenated to the second string is equal to the third string. Here are a few sample program runs: Sample Program 1: First string
Answer:
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner myObj = new Scanner(System.in);
//Request and receive first String
System.out.println("Enter username");
String firstString = myObj.nextLine();
//Request and receive second string
System.out.println("Enter second string");
String secondString = myObj.nextLine();
//Request and receive third string
System.out.println("Enter third string");
String thirdString = myObj.nextLine();
//Concatenate the first and second string
String concatA_B = firstString + secondString;
if(concatA_B.equals(thirdString)){
System.out.println("First String Concatenated to Second String is equals to the third String");
}
else{
System.out.println("First String Concatenated to Second String is NOT equals to the third String");
}
}
}
Explanation:
Import Scanner ClassRequest and Receive three variables from the user using the Scanner ClassConcatenate the first and secondUse the .equals() method to check for equality________ is the branch of computer science that deals with the attempt to create computers that think like humans.
Answer:
Artificial Intelligence (AI)
Explanation:
Artificial intelligence is a way of making computers to think critically, or act like humans. It involves the application of computer science and technology to produce critical problem solving device as humans.
It is a welcomed development and well accepted innovation to complement humans in proffering solutions to logical and critical problems. It has various applications in influencing the result or solution to mentally demanding tasks that require high intelligence.
It is possible to force the Hardware Simulator to load a built-in version of chip Xxx. This can be done by:
Answer:
The answer is "It Specifies the built-in chip in the module header".
Explanation:
The hardware simulator is also an instrument about which the device physical models could be constructed, in the mainframe, which includes a console, a power supply, or multiple sockets for plugging regular modules.
It plays a specific role in the computing system, and it is also essential for each standard module. In the hardware controller, it can be used to launch an integrated Xxx processor version, which can be achieved by listing the built-in chip throughout the module header.write a function solution that given an integer n returns a string consisting of n lowercase lettersn
Answer:
Following are the method to this question:
def solution(s):#defining a method solution
x=0#defining variable x that assign value 0
for i in s:#defining for loop to count string value in number
if(i.islower()):#defining if block that check input character is in lowercase
x=x+1#increment the value of x by 1
return x#return x
s=input("Enter string:")#defining s variable that input string value
print(solution(s))#defining print method to solution method
Output:
Enter string:Database is the colloection
22
Explanation:
In the given question some data is missing, that's why we define the answer as follows:
In the above code, a solution method is defined, which takes "s" variable as the parameter, and inside the method, an integer variable "x" is defined, that holds a value that is "0". In the next line, for loop is declared, that counts string value without space and inside the loop, if block is defined, that checks only the lowercase character and adds the value in x variable, and returns its value. Outside the method s variable is defined, that inputs the string value from the user end, and use the print method to call it and print its calculated value.The function returns a string of lowercase alphabets of length n, which is prescribed in the function. The function written in python 3 goes thus ;
import string, random
#import the string and random modules
l_case = [x for x in string.ascii_letters if x.islower()]
#use list comprehension to take a list of lower case alphabets
def n_letters(n):
#initialize a function which takes a single parameter, number of letters
lett = random.sample(l_case, n)
#take a random sample of n letters
return "".join(lett)
#use the join function to concatenate the string
print(n_letters(6))
# A sample run of the program is attached.
Learn more :https://brainly.com/question/15086326
Explain Basies Uses of spreadsheet ,
Answer:
The three most common general uses for spreadsheet software are to create budgets, produce graphs and charts, and for storing and sorting data. Within business spreadsheet software is used to forecast future performance, calculate tax, completing basic payroll, producing charts and calculating revenues.
Explanation:hope this helped hun
The purpose of an interface is to:___________
a) provide similar objects with the same functionality, even though each will implement the functionality differently
b) provide different types of objects with the comparable functionality, even though each will implement the functionality differently
c) provide default implementations of methods and properties
d) None of the above.
Answer:
Purpose of the interface
Provides communication − One of the uses of the interface is to provide communication. Through interface you can specify how you want the methods and fields of a particular type.Jul
Write an Enlistee class that keeps data attributes for the following pieces of information: • Enlistee name • Enlistee number Next, write a class named Private that is a subclass of the Enlistee class. The Private class should keep data attributes for the following information: • Platoon number (an integer, such as 1, 2, or 3) • Years of service (also an integer)
Answer:
function Enlistee( name, number ){
constructor( ){
super( ) ;
this.name= name;
this.number= number;
this.Private= ( platoonNumber, yearOfService ) =>{
this.platoonNumber = platoonNumber;
this.yearOfService = yearOfService;
}
}
}
Explanation:
In Javascript, OOP ( object-oriented programming) just like in other object oriented programming languages, is used to create instance of a class object, which is a blueprint for a data structure.
Above is a class object called Enlistee and subclass "Private" with holds data of comrades enlisting in the military.
1.16 LAB: Input: Welcome message Write a program that takes a first name as the input, and outputs a welcome message to that name. Ex: If the input is Pat, the output is:
Full Question
Write a program that takes a first name as the input, and outputs a welcome message to that name. Ex: If the input is Pat, the output is: Hello Pat, and welcome to CS Online!
Answer:
Python
nname = input("What is your name: ")
print("Hello "+nname+" , and welcome to CS Online!")
Explanation:
The programming ls not stated; However, I'll answer using Python
Python (See bold texts for line by line explanation)
This line prompts the user for input
nname = input("What is your name: ")
This line prints the welcome message
print("Hello "+nname+" , and welcome to CS Online!")
Can the teacher provide your feedback through Google Classroom?
Answer:
Yes
Explanation:
The teacher always answers all queries if she/he is online and the question u ask is understandable
Answer:
Yes
Explanation: A teacher can give the feedback individual/privately or publicity
Let S be an NP-complete problem and Q and R be two other problems not known to be in NP. Q is polynomial time reducible to S and S is polynomial time reducible to R. Which of the following statements are true?
A. R is NP complete
B. R is NP Hard
C. Q is NP complete
D. Q is NP hard
Answer:
B. R is NP Hard
Explanation:
Given:
S is an NP complete problem
Q is not known to be in NP
R is not known to be in NP
Q is polynomial times reducible to S
S is polynomial times reducible to R
Solution:
NP complete problem has to be in both NP and NP-hard. A problem is NP hard if all problems in NP are polynomial time reducible to it.
Option B is correct because as given in the question S is an NP complete problem and S is polynomial times reducible to R.
Option A is not correct because R is not known to be in NP
Option C is not correct because Q is also not known to be in NP
Option D is not correct because Q because no NP-complete problem is polynomial time reducible to Q.
A termination condition in a loop is analogous to________in a recursive method.
a) call.
b) iteration.
c) initialization condition.
Answer:
b) iteration.
Explanation:
There are various algorithms which are used in computer programming. Iteration is also a type of algorithm which is used to create loops. The instructions are inserted once and then these instructions are repeated to create a loop function.
token is 64 bytes long (the 10-Mbps Ethernet minimum packet size), what is the average wait to receive the token on an idle network with 40 stations? (The average number of stations the token must pass through is 40/2 = 20.
Given that,
Token is 64 bytes long
The average number of stations that the token must pass = 20
We need to calculate the transmission delay for token
Using formula of transmission delay
[tex]Transmission\ delay=\dfrac{token\ size}{minimum\ size}[/tex]
Put the value into the formula
[tex]Transmission\ delay=\dfrac{64\ bytes}{10\ Mbps}[/tex]
[tex]Transmission\ delay=\dfrac{64\times8}{10\times10^6}[/tex]
[tex]Transmission\ delay=0.0000512\ sec[/tex]
[tex]Transmission\ delay=5.12\times10^{-5}\ sec[/tex]
We need to calculate the average wait to receive token on an idle network with 40 stations
Using formula of average wait
[tex]\text{average wait to receive token}=\text{average number of stations that the token must pass}\times transmission\ delay[/tex]
Put the value into the formula
[tex]\text{average wait to receive token}=20\times5.12\times10^{-5}[/tex]
[tex]\text{average wait to receive token}= 0.001024\ sec[/tex]
[tex]\text{average wait to receive token}= 1.024\ ms[/tex]
Hence, The average wait to receive token on an idle network with 40 stations is 1.024 ms.
Complete the sentence about a presentation delivery method.
A(n) ____ allows you to transmit your presentations over the Internet using ____.
1: A. Presentation software
B. webcast
C. external monitor
2: A. Projectors
B. CDs
C. Streaming technology
Answer:
A Presentation software allows you to transmit your presentation over the internet using CDs??????????????????C
-How long does a copyright last?
Answer:
95 years
Explanation:
the dura- tion of copyright is 95 years from first publication or 120 years from creation, whichever is shorter (unless the author's identity is later revealed in Copyright Office records, in which case the term becomes the author's life plus 70 years).
I microwaved my phone and this Bluetooth popup won't go away and I can't connect to Bluetooth. Help. I have a Google pixel 3XL I'm no phone expert.
Answer: Why'd you'd Microwave your phone?
Explanation: Ok first don't do that, it can make it explode, and since you did that, it messed up something, you'll have to get it fixed or buy a new one
Hope this helps^^
Answer: C
Explanation:
I just took the test, and i am Smart
Dani wants to create a web page to document her travel adventures. Which coding language should she use? HTML Java Python Text
Answer:
I would recommend Python Programming languageExplanation:
The major reason i recommend python is that It has a ton of resources, and community support, such that it is practically impossible to get stuck while carrying out a project
Python is easy,and lets you build more functions with fewer lines of code.
More so, provides a stepping stone to learning other code and it is a very flexible language
Overloaded methods must be differentiated by: Select one: a. method name b. data type of arguments c. method signature d. None of the above
Answer:
b. data type of arguments
Explanation:
One of the ways to overload a method is using different type of arguments. Let's say we have a method that finds and returns two integer values
public int sumValues(int num1, int num2){
return num1 + num2;
}
We can overload this method by passing double values as arguments
public double sumValues(double num1, double num2){
return num1 + num2;
}
Answer the following
1. Explain the difference between likelihood and probability.
2. Give an example of a set of clusters in which merging based on the closeness of clusters leads to a more natural set of clusters than merging based on the strength of connection (interconnectedness) of clusters.
Answer:
zero, foresight
Explanation:
figure it out
In today’s fast-paced, often "agile" software development, how can the secure design be implemented?
Answer:
Answered below
Explanation:
The agile approach to software development involves development through the collaborative efforts of integrated and organised teams and users. Nowadays, people follow this approach because it allows for faster deployment, continuous updates as well as flexibility in development.
In the face of this rapid development and deployment, security design can be a challenge to keep up with.
Some steps to implement security in an agile environment include;
- Approaching security implementation in the same agile way as software development.
- Making software developers responsible for secure development and implementation.
- Utilising continuous integration of security practices by integrating security solutions with the development tools.
Why escape sequence is used? Explain with example?
Answer:
They are especially used to specify actions for eg. carriage returns and tab movements on terminals or printers.
They are also used to provide literal representation.
hope it helps!
Which of these is an example of output?
typing on a keyboard
a smartphone ringing
using a mouse
a fingerprint sensor
Answer:
a smartphone ringing
Explanation:
An output device is a computer hardware that converts data or signals into readable form like text, graphic, audio, video, tactile. Example of output devices are monitor, speaker, printer, projector. A smartphone ringing is a computer hardware because it converts the information into readable form in the form of sound.
Input devices is a computer hardware that sends information to the computer for interaction and control. Examples are mouse, keyboard, fingerprint sensor, scanner e.t.c.
o maintain reasonable key security (mark all that apply): Ensure that someone else always has an extra key. Ensure that no extra duplicates are made. Maintain strict control over master keys and control keys. Ensure that the key cannot be linked to the lock it operates.
Answer:
The answer is "second, third, and fourth choices"
Explanation:
In the question the numbering of the choices were missing if we numbering the choices so, the first choice will be one first number and second choice is in second and so on, and its explanation can be defined as follows:
The network safety key is a type of network login credentials or passwords which is used for provides authorization as well as access the network or device upon which client requests to communicate throughout the form of physical, digital, or biometrical information login.
It doesn't ensure the extra key. It helps ensure there were no additional duplicates. It keeps strict access codes as well as keys command. It makes sure, that its key could not be linked to able to operate the lock.Which of the following is true about the strategy that uses page fault frequency (PFF) to prevent thrashing?
A. A new process may be swapped in if PFF is too low.
B. A new page is allocated to a process if PFF is too high.
C. A page is deallocated from a process if the PFF is too low.
D. All of the above.
Answer:
The answer is "option B"
Explanation:
Thrashing arises whenever the virtual machine assets of a device are overused, leading to constant paging and page defect, that affects the processing of most programs.
In the given-question, only choice b is correct because this mechanism can be allocated to avoid the thumping of new pages if PFF is too high by increasing several frames or by removing expulsion frames.
Answer:
B. A new page is allocated to a process if PFF is too high.
Explanation:
Page fault frequency: In computer science, the term "page fault frequency" is also referred as PFF, and is described as a direct approach that is being utilized to handle thrashing and is considered as the one that tends to use "page-fault frequency concept". However, the problem that is connected with the "thrashing" is the "high-page fault rate" and therefore it is responsible for controlling the "page fault rate". However, if the "page-fault rate" is considerably too high, then it tends to indicate that the process consist of only few frames that is being allocated to it.
A ________ keeps your computer safe by determining who is trying to access it. gateway hub firewall switch
Answer:
firewall
Explanation:
a fire wall keeps unwanted hackers and viruses out of a computers system
What is the advantage of utilizing trees as a data structure? Describe a scenario where you may use either a linear data structure or a tree and show which would be more effective and why?
Answer:
The tree data structure provides more flexibility and practicality.
Explanation:
The tree data structure is more advantageous because of it's practicality in terms of forming relationships within the data.
A tree data structure would be preferable for an e-commerce website or database because it provides the ability to be able to links different products and group them under sub categories etc. Basically it makes a more reliable database in this situation.
I hope this answer helps.
assume your using a three button mouse. to access the short cut menus you would
Show the array that results from the following sequence of key insertions using a hashing system under the given conditions: 5, 205, 406, 5205, 8205, 307 (you can simply list the non-null array slots and their contents)
a. array size is 100, linear probing used.
b. array size is 100, quadratic probing used.
Answer:
a) Linear probing is one of the hashing technique in which we insert values into the hash table indexes based on hash value.
Hash value of key can be calculated as :
H(key) = key % size ;
Here H(key) is the index where the value of key is stored in hash table.
----------
Given,
Keys to be inserted are : 5 , 205, 406,5205, 8205 ,307
and size of the array : 100.
First key to be inserted is : 5
So, H(5) = 5%100 = 5,
So, key 5 is inserted at 5th index of hash table.
-----
Next key to inserted is : 205
So, H(205) = 205%100 = 5 (here collision happens)
Recompute hash value as follows:
H(key) =(key+i) % size here i= 1,2,3...
So, H(205) =( 205+1)%100 = 206%100 = 6
So, key 205 is inserted in the 6th index of the hash table.
----------
Next Key to be inserted : 406
H(406) = 406%100 = 6(collision occurs)
H(406) =(406+1) %100 = 407%100 = 7
So, the value 406 is inserted in 7the index of the hash table.
-----------------
Next key : 5205
H(5205) = 5205%100 = 5(collision)
So, H(5205) = (5205+1)%100 = 6( again collision)
So, H(5205) = 5205+2)%100 = 7(again collision)
So, H(5205) = (5205+3)%100 = 8 ( no collision)
So, value 5205 is inserted at 8th index of the hash table.
-------------
Similarly 8205 is inserted at 9th index of the hash table because , we have collisions from 5th to 8th indexes.
-------------
Next key value is : 307
H(307) = 307%100 = 7(collision)
So, (307+3)%100 = 310%100 = 10(no collision)
So, 307 is inserted at 10th index of the hash table.
So, hash table will look like this:
Key index
5 5
205 6
406 7
5205 8
8205 9
307 10
b) Quadratic probing:
Quadratic probing is also similar to linear probing but the difference is in collision resolution. In linear probing in case of collision we use : H(key) = (key+i)%size but here we use H(key) =( key+i^2)%size.
Applying Quadratic probing on above keys:.
First key to be inserted : 5.
5 will go to index 5 of the hash table.
-------
Next key = 205 .
H(205) = 205%100 = 5(collision)
So. H(key)= (205+1^2)%100 = 6(no collision)
So, 205 is inserted into 6th index of the hash table.
--------
Next key to be inserted 406:
So, 406 %100 = 6 (collision)
(406+1^2)%100 = 7(no collision)
So, 406 is moved to 7th index of the hash table.
----------
Next key is : 5205
So, 5205%100 = 5 (collision)
So, (5205+1^2)%100 = 6 ( again collision)
So, (5205+2^2)%100 = 9 ( no collision)
So, 5205 inserted into 9th index of hash table.
-----------
Next key is 8205:
Here collision happens at 5the , 6the , 9th indexes,
So H(8205) = (8205+4^2)%100 = 8221%100 = 21
So, value 8205 is inserted in 21st index of hash table.
--------
Next value is 307.
Here there is collision at 7the index.
So, H(307) = (307+1^2)%100 = 308%100= 8.
So, 307 is inserted at 8the index of the hash table.
Key Index
5 5
205 6
406 7
5205 9
8205 21
307 8
On the 80x86 CPU, the ESP register keeps track of the value on the top of the runtime stack.
a) true
b) false
Answer:
True
Explanation:
The ESP register acts as an indirect operand pointing to the top of the stack at any time.
Stack grows downwards from high memory when a program adds to the stack. However, when items are removed from the stack, it shrinks upwards from low to high memory.
The assembler reduces the stack pointer(ESP) register by 2, when a word value is pushed on to the stack. On the other hand, the assembler increases the stack pointer by 2 when a word value is popped off.
The assembler decreases or increases the ESP register by 4 when a double word value is pushed or popped off the stack respectively. Therefore the ESP register changes in multiples of 4.
Database __________ , which is the logical design of the database, and the database _______,which is a snapshot of the data in the database at a given instant in time.
A. Relation, Domain
B. Relation, Schema
C. Instance, Schema
D. Schema, Instance
Answer:
D. Schema, Instance.
Explanation:
Database schema, which is the logical design of the database, and the database instance, which is a snapshot of the data in the database at a given instant in time.
In database management, the term "schema" is used to denote a representation of data while the term "instance" is used to denote an instance of time.
A database schema is a structure which is typically used to represent the logical design of the database and as such represents how data are stored or organized and the relationships existing in a database management system. There are two (2) main categories of a database schema; physical database schema and logical database schema.
A database instance is a snapshot of the data in the database at a given instant in time and as such represents an operational database by following the conditions, validation and constraints set for a database management system.