Answer:
a
Explanation:
sdfghj
Write a C++ function using recursion that returns the Greatest Common Divisor of two integers. The greatest common divisor (gcd) of two integers, which are not zero, is the largest positive integer that divides each of the integers. For example, the god of 8 and 12 is 4.
Answer:
The function is as follows:
int gcd(int num1, int num2){
if (num2 != 0){
return gcd(num2, num1 % num2);}
else {
return num1;}
}
Explanation:
This defines the function
int gcd(int num1, int num2){
This is repeated while num2 is not 2
if (num2 != 0){
This calls the function recursively
return gcd(num2, num1 % num2);}
When num2 is 0
else {
This returns the num1 as the gcd
return num1;}
}
Hi ! How can you return the value of the class computeDiscountInfo to the variable savings in the main class ?
Here is my code :
import java.util.Scanner;
public class RoomCost{
public static void main (String [] args){
double price;
double discount;
double savings;
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter cutoff price for discount $>> ");
price = keyboard.nextDouble();
System.out.print("Enter discount rate as a whole number >> ");
discount = keyboard.nextDouble();
displayinfo();
//insert code to set the value returned from computeDiscountInfo method to savings);
// savings =
System.out.println("Special this week on any room over " + price);
System.out.println("Discount of " + discount + " percent");
System.out.println("That's a savings of at least $" + savings);
}
public static void displayinfo(){
System.out.println("We want your stay to be memorable.");
System.out.println("We promise to make you as comfortable as possible.");
}
public static double computeDiscountInfo(double price, double discountRate)
{
double savings;
//(insert code to calculate savings as price multiplied by discount divided by 100);
savings = (price * discountRate)/100;
return savings;
}
}
Answer:
savings = computeDiscountInfo(price, discount);
Explanation:
First of all computeDiscountInfo is a function, not a class.
You can call this function and assign its return value to a variable, savings in this example.
Define a generic function called CheckOrder() that checks if four items are in ascending, neither, or descending order. The function should return -1 if the items are in ascending order, 0 if the items are unordered, and 1 if the items are in descending order. The program reads four items from input and outputs if the items are ordered. The items can be different types, including integers, strings, characters, or doubles. Ex. If the input is: bat hat mat sat 63.2 96.5 100.1 123.5 the output is: Order: -1 Order: -1
Answer and Explanation:
Using javascript:
/*This function checks only for ascending order. This function cannot check ascending orders for strings, just integers or floats.*/
function CheckOrder(){
var takeinput= prompt("please enter four numbers")
var makeArray= takeinput.split("");
var numArray= new Array(4);
numArray= [makeArray];
var i;
for(i=0; i<=numArray.length; i++){
var nowElem= numArray[i];
if(numArray[1]){
Alert("let's check to see");
}
else if(
nowElem > numArray[i--]){
Alert("might be ascending order");
if(numArray[i]==numArray[2]){
var almosthere=numArray[2]
}
else if(numArray[i]==numArray[3]){
var herenow=numArray[3];
if(almosthere>herenow){
Alert("numbers are in ascending order");
}
}
}
else(
Console.log("there are no ascending orders here")
)
}
The function above can further be worked on to also check for descending order of four numbers(can also be further developed to check for strings). You need just tweak the else if and nested else if statements thus :
else if(
nowElem < numArray[i--]){
Alert("might be descending order");
if(numArray[i]==numArray[2]){
var almosthere=numArray[2]
}
else if(numArray[i]==numArray[3]){
var herenow=numArray[3];
if(almosthere<herenow){
Alert("numbers are in descending order");
}
}
}
6. It is now one of the most popular forms of entertainment, and there will always
be a need for such devices.
omotor
Answer:
then where is question ??????
cloud offers better protection compare to on premise?
Why is cloud better than on-premise? Dubbed better than on-premise due to its flexibility, reliability and security, cloud removes the hassle of maintaining and updating systems, allowing you to invest your time, money and resources into fulfilling your core business strategies.
The security of the cloud vs. on-premises is a key consideration in this debate. Cloud security controls have historically been considered less robust than onprem ones, but cloud computing is no longer a new technology. . A company running its own on-premises servers retains more complete control over security.
Believe it!!
Pls follow me.
what are the draw backs of the third generation computer
Answer:
They are quite expensiveThey have the disadvantage of requiring cooling for their mainframe computers integral components cannot be repaired once damagedintegrated components require advanced knowledge to serviceA function that uses the binary search algorithm to search for a value in an array a. repeatedly divides the elements into the number of segments you specify and discards the segments that don’t have the value until the value is found and a pointer to the element is returned b. repeatedly divides the elements in half and discards the half that doesn't have the value until the value is found and a pointer to the element is returned c. repeatedly divides the sorted elements in half and discards the half that doesn't have the value until the value is found and the index of the element is returned d. repeatedly divides the elements into the number of segments you specify and discards the segments that don’t have the value until the value is found and the index of the element is returned
Answer:
c. repeatedly divides the sorted elements in half and discards the half that doesn't have the value until the value is found and the index of the element is returned.
Explanation:
When binary search is used for algorithm search then the work is searched in the sorted array. There arrays are divided in half and then half of the elements are discarded who does not have value. The search does not completes until it founds the value and index of the element.
Write a program that repeatedly accepts as input a string of ACGT triples and produces a list of the triples and the corresponding amino acids, one set per line. The program will continue to accept input until the user just presses ENTER without entering any DNA codes.
Answer:
Explanation:
The following code is written in Python. I created a dictionary with all the possible gene combinations and their corresponding amino acids. The user then enters a string. The string is split into triples and checked against the dictionary. If a value exists the gene and amino acid is printed, otherwise an "Invalid Sequence" error is printed for that triple. The program has been tested and the output can be seen in the attached image below.
def printAminoAcids():
data = {
'TTT': 'Phe', 'TCT': 'Ser', 'TGT': 'Cys', 'TAT': 'Tyr',
'TTC': 'Phe', 'TCC': 'Ser', 'TGC': 'Cys', 'TAC': 'Tyr',
'TTG': 'Leu', 'TCG': 'Ser', 'TGG': 'Trp', 'TAG': '***',
'TTA': 'Leu', 'TCA': 'Ser', 'TGA': '***', 'TAA': '***',
'CTT': 'Leu', 'CCT': 'Pro', 'CGT': 'Arg', 'CAT': 'His',
'CTC': 'Leu', 'CCC': 'Pro', 'CGC': 'Arg', 'CAC': 'His',
'CTG': 'Leu', 'CCG': 'Pro', 'CGG': 'Arg', 'CAG': 'Gln',
'CTA': 'Leu', 'CCA': 'Pro', 'CGA': 'Arg', 'CAA': 'Gln',
'GTT': 'Val', 'GCT': 'Ala', 'GGT': 'Gly', 'GAT': 'Asp',
'GTC': 'Val', 'GCC': 'Ala', 'GGC': 'Gly', 'GAC': 'Asp',
'GTG': 'Val', 'GCG': 'Ala', 'GGG': 'Gly', 'GAG': 'Glu',
'GTA': 'Val', 'GCA': 'Ala', 'GGA': 'Gly', 'GAA': 'Glu',
'ATT': 'Ile', 'ACT': 'Thr', 'AGT': 'Ser', 'AAT': 'Asn',
'ATC': 'Ile', 'ACC': 'Thr', 'AGC': 'Ser', 'AAC': 'Asn',
'ATG': 'Met', 'ACG': 'Thr', 'AGG': 'Arg', 'AAG': 'Lys',
'ATA': 'Ile', 'ACA': 'Thr', 'AGA': 'Arg', 'AAA': 'Lys'
}
string = input("Enter Sequence or just click Enter to quit: ")
sequence_list = []
count = 0
gene = ""
for x in range(len(string)):
if count < 3:
gene += string[x]
count += 1
else:
sequence_list.append(gene)
gene = ""
gene += string[x]
count = 1
sequence_list.append(gene)
for gene in sequence_list:
if gene.upper() in data:
print(str(gene.upper()) + ": " + str(data[gene.upper()]))
else:
print(str(gene.upper()) + ": invalid sequence")
printAminoAcids()
The word “computer” has become associated with anything related to screens and keyboard. However, these are not the only parts that makes the computer function. The Central processing unit is often referred to as the brain of the computer which practically coordinates all the activities in the computer. Briefly describe the operation of the Central Processing Unit with emphasis on its sub components.
Explanation: The CPU is the main control chip which calculates what has to be done in order for your computer to function.
(Very interesting question you had. Hope this answer helps)
Essay on "Impact of Digitalization"
Answer:
Digitization has a proven impact on reducing unemployment, improving quality of life, and boosting citizens' access to public services. Finally, digitization allows governments to operate with greater transparency and efficiency
Why are data silos problematic?
Answer:
Hampers collaboration
Resource wastage
Lack of data integrity
Explanation:
Data silos comes into play When different departments of an orgainiziations independently collects data needed for its operations. The finance, HR, administrative departments and so on collects their data and keeps it to themselves. As a result there is a repetitive and needless gathering and storage of already existing data, that is the data required by one group will have to be gathered again while it currently exists with another group. This leads to inefficient resource management and wastage. This practice also leads to data integrity as data stored differently across departments becomes inconsistent and less accurate over time. Team work and collaboration is gradually eroded as each group continues to hold on to its resources which poses a problem towards organizational growth.
A choropleth map is used to
Group of answer choices
do a scatter plot.
show live satellite images.
present geographical regions in 3D.
present geographical regions coloured, shaded, or graded according to some variable.
Write a program palindrome.py that prompts for a sequence of words or numbers on a single line and checks if the entries are palindromes or not. A word or a number is a palindrome if it remains unchanged when reversed. e.g. rotor is a palindrome; but python is not a palindrome. e.g. 737 is a palindrome; but 110 is not a palindrome. The program receives the sequence as input and returns True if an entry is a palindrome or False if an entry is not a palindrome. Print the boolean value on one line. Print the palindromes count on the next line.
Answer:
Explanation:
The program first asks the user for the sequence of words. Then it splits the sequence into an array of words. Then it loops through the array checking each word to see if it is a palindrome. If it is it prints the word, the boolean value, and adds 1 to the palindrome_count variable. Otherwise it prints the word, false, and moves on to the next word in the list. Finally, it prints out the total value of palindrome_count.
word = input("Enter sequence of words: ")
word_list = word.split(' ')
print(word_list)
palindrome_count = 0
for word in word_list:
print('\n\n')
reverse = word[::-1]
if word == reverse:
print(word, end='\n')
print(True, end="\n")
palindrome_count += 1
else:
print(word, end='\n')
print(False, end='\n')
print("\n\nNumber of Palindromes in Sequence: " + str(palindrome_count))
with the aid of examples explain the differences between open source software and licensed software
Answer:
Explanation:
Source is when a company go no limits to run the software but can easily be taken done by a complaint or two or a bug while a licensed it a protected version of the software.
a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100. End each prompt with newline Ex: For the user input 123, 395, 25, the expected output is:Enter a number (<100):Enter a number (<100):Enter a number (<100):Your number < 100 is: 25
Answer:
Explanation:
import java.util.Scanner;
//Declare the class NumberPrompt.
public class NumberPrompt
{
public static void main(String args[])
{
/*Declare the variable of scanner class and allocate the
memory.*/
Scanner scnr = new Scanner(System.in);
//Initialize the variable userInput.
int userInput = 0;
/* Your solution goes here*/
//Start the do-while loop
do
{
//Prompt the user to enter the number.
System.out.println("Enter a number(<100)");
/*Store the number entered by the user in the
variable userInput.*/
userInput=scnr.nextInt();
}while(userInput>=100);/*Run the do-while loop till the
user input is greater than 100*/
//Print the number which is less than 100.
System.out.println("Your number <100 is "+userInput);
return;
}
}
Output:-
How does a Cloud-first strategy approach a client's migration to the Cloud?
Answer:
by focusing on a single discipline based on the client's greatest area need.
A _______ read inputs the first data item from a file. It typically appears immediately before the loop that processes the data from the file and inputs the remaining data from the file.
Answer:
the answer is priming read
Explanation:
hope it helps u
mk chưa hiểu nên các bạn giúp mk vs
Answer:
my tab and state it all over my name to
is a security design principle to direct the selection of control layers for an organization's computing enclave to ensure its resilience against various methods of attack. This also reduces the likelihood of a single point of failure in the security of the overall system.
Answer:
Defense in Depth (DiD).
Explanation:
Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.
Defense in Depth (DiD) can be defined as a concept or framework in cyber security that typically involves the process of layering multiple defensive mechanisms and security control throughout an information technology (IT) system, so as to prevent data theft or an unauthorized access to user data.
Basically, this cyber security technique is designed such that when a layer of the defensive mechanism fails, another security layer step in to mitigate and prevent the attack. Thus, it causes redundancy when an attacker exploits a vulnerability in a system, a breach of security or when one of the security layers fail.
Khi thu nhập giảm, các yếu tố khác không đổi, giá cả và sản lượng cân bằng mới của hàng hóa thông thường sẽ:
Answer:
thấp hơn
Explanation:
What Causes #### error?
Answer:
The answer is below
Explanation:
Causes of ####error in Microsoft Excel can be traced to multiple sources. The major causes of #### error in Microsoft Excel, however, are the following:
1. When the column is not wide enough to show all values or figures of the cell contents.
2. When there are too many decimal places of the figure in a cell
3. When the date value in the cell is negative
4. When the time value in the cell is negative.
A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following concerns is MOST likely to be raised as a possible security issue in relation to these devices?
A. Sensitive scanned materials being saved on the local hard drive
B. Faulty printer drivers causing PC performance degradation
C. Improperly configured NIC settings interfering with network security
D. Excessive disk space consumption due to storing large documents
Answer:
D. Excessive disk space consumption due to storing large documents.
Explanation:
When a company is planning to use NAFDs in its office rather than paper work, the efficiency of employees will increase as unnecessary paper work takes time in handling and printing. When data is stored on disks there is a risk that employees store large or irrelevant files in the disk which will create storage issues.
Which of the following definitions best describes the principle of separation of duties?
Answer:
A security stance that allows all communications except those prohibited by specific deny exceptions
A plan to restore the mission-critical functions of the organization once they have been interrupted by an adverse event
A security guideline, procedure, or recommendation manua
lAn administrative rule whereby no single individual possesses sufficient rights to perform certain actions
The advantage of returning a structure type from a function when compared to returning a fundamental type is that a. the function can return multiple values b. the function can return an object c. the function doesn’t need to include a return statement d. all of the above e. a and b only
Answer:
The advantage of returning a structure type from a function when compared to returning a fundamental type is that
e. a and b only.
Explanation:
One advantage of returning a structure type from a function vis-a-vis returning a fundamental type is that the function can return multiple values. The second advantage is that the function can return can an object. This implies that a function in a structure type can be passed from one function to another.
True or False.
Figuring out the learning styles of your instructors will help you better understand how they prefer to teach.
Which of the following is not a data visualization technique?
Answer:
Normalization
Explanation:
From the options given :
Boxplot is a data visualization techniqye used for representing numerical data in the form of a box such that it adequately conveys the five number summary if the dataset which are the minimum, maximum, lower quartile, median and upper quartile, it also depicts the presence of outlines.
Scatter plot are used depict the relationship between two variables on the x and y axis of a graph. Each point is a representation of the (x, y) value pairs of the observation.
Tag clouds are usually used to represent word, metatdata and other free form text using different colors and font sizes to give information about the data.
Normalization is the odd option out as it is used to restructure data in other to promote integrity of data.
correct single error in this. Try to appear relaxed, but not to relaxed
Try to appear relaxed, but not to relaxed .
Write an algorithm to output half the value for each of the five even numbers
There are some steps with the help of which we can easily find the output half of the value for each of 5 even numbers.
Such steps are provided below:
⇒ Step 1:
Start
⇒ Step 2:
Declare three variables such as "temp1", "temp2", "count".
⇒ Step 3:
Initialize
the count variable to zero (0), i.e., [tex]count \leftarrow 0[/tex] and
the temp variable to zero (0), i.e., [tex]temp \leftarrow 0[/tex]
⇒ Step 4:
Repeat the steps until the count will be 5 (count < 5)
[tex]temp1 = temp1+2;[/tex][tex]temp2=temp\frac{1}{2};[/tex][tex]print \ 'temp2';[/tex][tex]count \leftarrow count+1;[/tex]⇒ Step 5:
Stop
Lean more about algorithm here:
https://brainly.com/question/14432459
Definition of my computer
Answer:
a programmable electronic device designed to accept data
Explanation:
a programmable electronic device designed to accept data
Difference between hardcopy and hardware