Answer:
First, it is important to realize that the nervous system is divided into two parts: the central nervous system and the peripheral nervous system.
in
6) which device can not be shared
network?
Answer:
mouse cannot be shared on network
Write a program, which will display the menu with 5 items. It will ask the use to give their choice. It will trap all possible errors and then print the result when correct input is provided before exiting the program.
Answer:
The program in Python is as follows:
print("Welcome to sorting program")
print("1. Title")
print("2. Rank")
print("3. Date")
print("4. Start")
print("5. Likes")
while(True):
choice = input("Enter a choice between 1 and 5 only: ")
if choice.isdigit() == True:
if(int(choice)>=1 and int(choice)<=5):
print("You entered valid choice", choice)
break;
else:
print("You have not entered a number between 1 and 5. Try again")
else:
print("You entered an invalid choice")
Explanation:
This prints the header
print("Welcome to sorting program")
The next 5 lines print the instructions
print("1. Title")
print("2. Rank")
print("3. Date")
print("4. Start")
print("5. Likes")
The loop is repeated until it is forcefully exited
while(True):
This prompts the user to enter a choice
choice = input("Enter a choice between 1 and 5 only: ")
This checks if the choice is a digit
if choice.isdigit() == True:
If yes, this checks if the choice is between 1 and 5 (inclusive)
if(int(choice)>=1 and int(choice)<=5):
If yes, this prints valid choice and the choice entered
print("You entered valid choice", choice)
The loop is exited
break;
If the choice is out of range
else:
This prints the error and tells the user to try again
print("You have not entered a number between 1 and 5. Try again")
If choice is not a digit
else:
This prints invalid choice
print("You entered an invalid choice")
Dutermine the number of hosts in each of the subnet in the network shown in Figure ?
Answer:
Neither answer so far is correct. Assuming you are starting with a class B address, you have 10 bits for subnets. 2^10 is 1024. So 1024 subnets are available.
Each subnet will have 6 bits for hosts. 2^6 = 64. We subtract 2 for the first and last address in the subnet, so 62 host addresses are available per subnet.
Explanation:
there is the example
with detail in image
A file system uses a bitmap to keep track of free disk space. One bit represents a 512-byte block. The disk contains 3 files, in the order: A, B, C, with the respective sizes of 1040, 700, 2650 bytes. Which one below is the correct bitmap?
A. 0111000111111 ....
B.1111111100110 ...
C.1011101101100...
D. 1111111111100
Answer:
B. 1111111100110
Explanation:
Bitmap is the technique for mapping from some domain bits. This is particularly referred to as pix-map which is actually map of pixels and this contains more than two colors. it used more than one bit per pixel. Pixels lesser than 8 will represent gray scale.
Which of the following is a virtual space, used for internal communications, that allows employees to share files and work together?
O Intranet
O Internet
O Telnet
O World Wide Web
Answer: intranet
Intranet is run on local networks only, but it is created based on the world wide web.
Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents. For example, if the amount is 86 cents, the output would be something like the following:
86 cents can be given as 3 quarters 1 dime and 1 penny
Use coin denominations of 25 cents (quarters), 10 cents (dimes), and 1 cent (pennies). Do not use nickel and half dollar coins. Your program will use the following function (among others):
void computeCoin(int coinValue, int& number, int& amountLeft);
For example, suppose the value of the variable amountleft is 86. Then, after the following call, the value of number will be 3 and the value of amountLeft will be 11 (because if oyu take three quarters from 86cents, that leaves 11 cents):
computecoins (25, number, amountLeft);
Include a loop that lets the user repeat this computation for new input values until the suer says he or she wants to end the program (Hint: use integer division and the % operator to implement this function.)
Add all numbers up
and you will get your sum
A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) Ex: If the input is: 5345 the output is: 2.67 Your program must define and call the following function. The function should return the amount of miles walked. def steps_to_miles(user_steps)
Answer:
Follows are the code to the given question:
def steps_to_miles(user_steps):#defining a method steps_to_miles that takes a variable user_steps
return user_steps/2000#use return to calculate the steps
user_steps = int(input())#defining a variable user_steps that holds value from the user-end
print('%0.2f' % steps_to_miles(user_steps))#defining print that calls the steps_to_miles method
Output:
5345
2.67
Explanation:
In this code a method "steps_to_miles" that takes "user_steps" in the parameter inside the method a return keyword is used that calculates the user steps and return its values.
Outside the method, a "user_steps" variable is declared that inputs the value from the user-end pass into the method and prints its value.
Debug the recursive reverseString method, which is intended to return the input String str reversed (i.e. the same characters but in reverse order).
Use the runner class to test this method but do not write your own main method or your code will not be graded correctly.
public class U10_L2_Activity_One
{
public static String reverseString(String str)
{
if (str.length() < 0)
{
return str;
}
s = reverseString(str.substring(2)) + str.substring(0,1);
}
}
Runner's code (don't change):
import java.util.Scanner;
public class runner_U10_L2_Activity_One
{
public static void main(String[] args)
{
System.out.println("Enter string:");
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
System.out.println("Reversed String: " + U10_L2_Activity_One.reverseString(s));
}
}
Answer:
Explanation:
The following modified code correctly uses recurssion to reverse the string that was passed as a parameter to the reverseString method. A test output using the runner class can be seen in the attached image below.
import java.util.Scanner;
class U10_L2_Activity_One {
public static String reverseString(String str) {
if (str.isEmpty()) {
return str;
}
return reverseString(str.substring(1)) + str.charAt(0);
}
}
class runner_U10_L2_Activity_One
{
public static void main(String[] args)
{
System.out.println("Enter string:");
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
System.out.println("Reversed String: " + U10_L2_Activity_One.reverseString(s));
}
}
Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input order and separated by exactly one space (i.e., if a number appears multiple times, it is displayed only once). After the input, the array contains the distinct numbers. Here is a sample run of the program.
Answer:
Explanation:
The following code is written in Python. It creates a for loop that iterates 10 times, asking the user for a number every time. It then checks if the number is inside the numArray. If it is not, then it adds it to the array, if it is then it skips to the next iteration. Finally, it prints the number of distinct numbers and the list of numbers.
numArray = []
for x in range(10):
num = input("Enter a number")
if int(num) not in numArray:
numArray.append(int(num))
print("Number of Distince: " + str(len(numArray)))
for num in numArray:
print(str(num), end = " ")
List the invoice number and invoice date for each invoice that was created for James Gonzalez but that does not contain an invoice line for Wild Bird Food (25lb).
Answer:
Derive FROM invoice_transaction, invoice_details, item_details
and JOIN customer_details ON (invoice_transaction.CUST_ID = customer_details.CUST_ID AND customer_details.FIRST_NAME = 'James' AND customer_details.LAST_NAME = 'Gonzalez')
Explanation:
The following details will be there in the invoice
item_details rep_details invoice_details customer_details invoice_transactionDerive FROM invoice_transaction, invoice_details, item_details
and JOIN customer_details ON (invoice_transaction.CUST_ID = customer_details.CUST_ID AND customer_details.FIRST_NAME = 'James' AND customer_details.LAST_NAME = 'Gonzalez')
Create an array using the makeRandomArray method, then take a start time using System.currentTimeMillis(). Next, run the array through one of the sort methods in the Sorter class. Finally, record the end time. Subtract the start time from the end time and print out the results. You will test each of the 3 sorts.
Required:
Is the fastest sort always the same?
2- Write aC+ program that calculates the sum of all even numbers from [1000,2000], using the while loop.
Answer:
#include <iostream>
using namespace std;
int main() {
int n = 1000;
int sum = 0;
while(n <= 2000) {
sum += n;
n += 2;
}
cout << "sum of even numbers in [1000..2000] = " << sum << endl;
}
Explanation:
This will output:
sum of even numbers in [1000..2000] = 751500
Question B_1 (15 points) Please define (describe) local variables and how they are used in computer programming ( e.g. In C, C ). Please write clearly and use no more than 2 sentences. Question B_2 ( 15 points) Please define (describe) static variables and how they are used in computer programming ( e.g. In C, C ). Please write clearly and use no more than 2 sentences. Question
Answer and Explanation:
Static variables are variables that still maintain their values outside the score which they are declared. They are declared with the static keyword
Example:
static int score = 30;
Local variables are variables whose scope are restricted to a block. Their values are restricted to the block which they are declared in.
Example:
void abd(){
int score;
}
score is a local variable to abcd() function
Security monitoring has detected the presence of a remote access tool classified as commodity malware on an employee workstation. Does this allow you to discount the possibility that an APT is involved in the attack
Answer:
No it doesn't
Explanation:
Targeted malware can be linked to such high resource threats as APT. Little or nothing can be done to stop such advanced persistent threats. It is necessary to carry out an evaluation on other indicators so that you can know the threat that is involved. And also to know if the malware is isolated or greater than that.
write a program to print the given number is prime or composit using do while loop
Answer:There are 28 chocolate-covered peanuts in 1 ounce (oz). Jay bought a 62 oz. jar of chocolate-covered peanuts.
Problem:
audio
How many chocolate-covered peanuts were there in the jar that Jay bought?
Enter your answer in the box.
Explanation:There are 28 chocolate-covered peanuts in 1 ounce (oz). Jay bought a 62 oz. jar of chocolate-covered peanuts.
Problem:
audio
How many chocolate-covered peanuts were there in the jar that Jay bought?
Enter your answer in the box.
Part1) Given 3 integers, output their average and their product, using integer arithmetic.
Ex: If the input is:
10 20 5
the output is:
11 1000
Note: Integer division discards the fraction. Hence the average of 10 20 5 is output as 11, not 11.6667.
Note: The test cases include three very large input values whose product results in overflow. You do not need to do anything special, but just observe that the output does not represent the correct product (in fact, three positive numbers yield a negative output; wow).
Submit the above for grading. Your program will fail the last test cases (which is expected), until you complete part 2 below.
Part 2) Also output the average and product, using floating-point arithmetic.
Output each floating-point value with two digits after the decimal point, which can be achieved by executing
cout << fixed << setprecision(2); once before all other cout statements.
Ex: If the input is:
10 20 5
the output is:
11 1000
11.67 1000.00
Answer:
The program is as follows:
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
int num1, num2, num3;
cin>>num1>>num2>>num3;
cout << fixed << setprecision(2);
cout<<(num1 + num2 + num3)/3<<" ";
cout<<num1 * num2 * num3<<" ";
return 0;
}
Explanation:
This declares three integer variables
int num1, num2, num3;
This gets input for the three integers
cin>>num1>>num2>>num3;
This is used to set the precision to 2
cout << fixed << setprecision(2);
This prints the average
cout<<(num1 + num2 + num3)/3<<" ";
This prints the product
cout<<num1 * num2 * num3<<" ";
1- By using C++ programming language write a program which displays the Fibonacci Series numbers. Note: The number of elements is taken as in input from the user Hint: The Fibonacci Sequence: 0,1,1,2,3,5,8,13,21,34,55.. .
Answer:
i hope this helpful for you
Explanation:
Example 1.
#include <iostream>
using namespace std;
int main() {
int n, t1 = 0, t2 = 1, nextTerm = 0;
cout << "Enter the number of terms: ";
cin >> n;
cout << "Fibonacci Series: ";
for (int i = 1; i <= n; ++i) {
// Prints the first two terms.
if(i == 1) {
cout << t1 << ", ";
continue;
}
if(i == 2) {
cout << t2 << ", ";
continue;
}
nextTerm = t1 + t2;
t1 = t2;
t2 = nextTerm;
cout << nextTerm << ", ";
}
return 0;
}
Example 2.
#include <iostream>
using namespace std;
int main() {
int t1 = 0, t2 = 1, nextTerm = 0, n;
cout << "Enter a positive number: ";
cin >> n;
// displays the first two terms which is always 0 and 1
cout << "Fibonacci Series: " << t1 << ", " << t2 << ", ";
nextTerm = t1 + t2;
while(nextTerm <= n) {
cout << nextTerm << ", ";
t1 = t2;
t2 = nextTerm;
nextTerm = t1 + t2;
}
return 0;
}
The program DebugTwo2.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.// This program greets the user// and multiplies two entered valuesusing System;using static System.Console;class DebugTwo2{static void main(){string name;string firstString, secondSting;int first, second, product;Write("Enter your name >> );name = ReadLine;Write("Hello, {0}! Enter an integer >> ", name);firstString = ReadLine();first = ConvertToInt32(firstString);Write("Enter another integer >> ");secondString = Readline();second = Convert.ToInt(secondString);product = first * second;WriteLine("Thank you, {1}. The product of {2} and {3} is {4}", name, first, second, product);}}
Answer:
The corrected code is as follows:
using System;
using static System.Console;
class DebugTwo2{
static void Main(string[] args){
string name;string firstString, secondString;
int first, second, product;
Write("Enter your name >> ");
name = ReadLine();
Write("Hello, {0}! Enter an integer >> ", name);
firstString = ReadLine();
first = Convert.ToInt32(firstString);
Write("Enter another integer >> ");
secondString = ReadLine();
second = Convert.ToInt32(secondString);
product = first * second;
Write("Thank you, {0}. The product of {1} and {2} is {3}", name,first, second, product);
}
}
Explanation:
string name;string firstString, secondString; ----- Replace secondSting with secondString,
int first, second, product;
Write("Enter your name >> "); --- Here, the quotes must be closed with corresponding quotes "
name = ReadLine(); The syntax of readLine is incorrect without the () brackets
Write("Hello, {0}! Enter an integer >> ", name);
firstString = ReadLine();
first = Convert.ToInt32(firstString); There is a dot between Convert and ToInt32
Write("Enter another integer >> ");
secondString = ReadLine(); --- Readline() should be written as ReadLine()
second = Convert.ToInt32(secondString);
product = first * second;
Write("Thank you, {0}. The product of {1} and {2} is {3}", name,first, second, product); --- The formats in {} should start from 0 because 0 has already been initialized for variable name
}
}
computer __ is any part of the computer that can be seen and touched
WAP to find area of circle
Answer:
program by LET statement
Explanation:
CLS
REM to find the area of circle
LET r=10
LET a=22/7*2*r^2
PRINT "area=;"a
END
press f5
output:
a=628.57
What Service is an AWS service that helps you maintain application availability and enables you to automatically add or remove EC2 instances according to conditions you define
Answer:
AWS EC2 auto scaling
Explanation:
The Amazon EC2 auto scaling is the service provided by AWS which helps one to maintain the application availability and also to enable one to automatically add as well remove the EC2 instances as per the conditions one wishes for.
One can add the EC2 or remove it manually in a combination with the AWS auto scaling for the predictive scaling of the application. We can also use dynamic and the predictive scaling features of the EC2 Auto Scaling so as to add or remove the EC2 instances
True or false a mirrorless camera has a pentaprism
Answer:
No the pentaprism or pentamirror are both optical viewfinder viewing systems and are not part of the mirrorless camera. Some thing the pentaprism actually operates better than the electronic viewfinder of mirrorless cameras.
Explanation:
magbigay ng ibang produkto na ginagamitan ng kasanayan ng basic sketching shading at outlining
Answer:
Procreate
Explanation:
Exercise : Randomizer In this exercise, we are going to create a static class Randomizer that will allow users to get random integer values from the method nextInt() and nextInt(int min, int max). Remember that we can get random integers using the formula int randInteger = (int)(Math.random() * (range + 1) + startingNum). nextInt() should return a random value from 1 - 10, and nextInt(int min, int max) should return a random value from min to max. For instance, if min is 3 and max is 12, then the range of numbers should be from 3 - 12, including 3 and 12.
Answer:
Here the code is by using java.
Explanation:
//Randomizer.java
public class Randomizer {
public static int nextInt() {
//get random number from 1-10
int randInteger = (int) (Math.random() * (11) + 1);
//if number is greater than 10 or less than 1
while (randInteger > 10 || randInteger < 1) {
randInteger = (int) (Math.random() * (11) + 1);
}
return randInteger;
}
public static int nextInt(int min, int max) {
//formula to get random number from min-max
int randInteger = (int) (Math.random() * (max + 1) + min);
while (randInteger > max || randInteger < min) {
randInteger = (int) (Math.random() * (max + 1) + min);
}
return randInteger;
}
}
//RandomizerTester.java
public class RandomizerTester {
public static void main(String[] args) {
System.out.println("Results of Randommizer.nextInt()");
for (int i = 0; i < 10; i++) {
System.out.println(Randomizer.nextInt());
}
int min = 5;
int max = 10;
System.out.println("\n Results of Randomizer.nextInt(5,10)");
for (int i = 0; i < 10; i++) {
System.out.println(Randomizer.nextInt(min, max));
}
}
}
OUTPUT:
Results of Randommizer.nextInt()
9
2
3
8
5
9
4
1
9
2
Results of Randomizer.nextInt(5,10)
9
8
9
7
5
10
5
10
7
7
Select the true statement about a scanner.
a. It is a device that outputs digital images and text onto a screen.
b. It is a device that enables users to output digital images or text as hard copies.
c. It is an input device that enables users to convert hard copies to digital images or text.
d. It is a device that enables users to input photographs as digital images.
Answer:
c. It is an input device that enables users to convert hard copies to digital images or text.
Explanation:
An input device can be defined as any device that is typically used for sending data to a computer system.
A scanner can be defined as an input device designed for transferring informations and images from hardcopy (physical) documents to digital computer files. Thus, it's simply an electronic input device that is used to digitally scan or copy data (informations) from a hardcopy document such as photographs, paper files, printed texts etc and then converted to a digital computer file in formats such as png, or jpeg. The scanner is a device which avail users the ability and opportunity to view, edit and transfer hardcopy document on a computer system in soft-copy.
Majority of the scanners used around the world are flatbed scanners and as such have a flat glass surface for scanning documents.
Basically, all scanners are to be used with a device driver software pre-installed on the computer before the configuration of the scanner.
Other types of scanners are drum scanners, contact image sensor (CIS) scanner, CCD scanner, planetary scanner, 3D scanner, Roller scanner etc.
describe all the main stress causal agents
Answer:
Causes of Stress
Being unhappy in your job.
Having a heavy workload or too much responsibility.
Working long hours.
Having poor management, unclear expectations of your work, or no say in the decision-making process.
Working under dangerous conditions.
Being insecure about your chance for advancement or risk of termination.
List and explain the factors to consider when buying a computer
Answer:
what it's main use is going to be
Explanation:
The main factor when considering buying a PC is what it's main use is going to be. This will determine what components you will need to look for. For example, if you are going to use the computer for video editing and work then you will need one with a high end CPU and lots of RAM. If you are going to use the PC for regular everyday use such as work programs (AutoCAD, Office, Photoshop, etc. ) Then you can buy a regular office computer with a mid-tier CPU, and 8GB of RAM, and no graphic card. A PC for gaming at high resolutions will require all high end parts including a high end graphics card. Therefore, knowing what its main use will be will determine cost, and what tier components you will need to buy.
Joe has just started the Security Module. He wants to get through it as quickly as possible and take the Quiz. As he clicks through the unit, he sees a bunch of text with some activities sprinkled throughout, and is trying to decide how to proceed.
Required:
Which strategies would likely be most effective and efficient for Joe?
Answer:
Joe should read the explanatory text and complete the learning activities.
Explanation:
Given
See attachment for options
Required
Best strategy to get through the module
First off, rushing through the activities and taking guess for each question (as suggested by (a)) will not help him;
He may complete the activities but sure, he won't learn from the module.
Also, reading through the units without completing the activities is not an appropriate method because Joe will not be able to test his knowledge at the end of the module.
The best strategy to employ is to read through the units and complete the activities, afterwards (option (b)).
Paravirtualization is ideal for
Answer:to allow many programs, through the efficient use of computing resources including processors and memory, to operate on a single hardware package.
Explanation:
Importance
computer
In the
printing industry
Answer:
restate your question
Explanation: