Answer:
The program in Python is as follows:
def get_user_values():
user_values = []
n = int(input())
for i in range(n+1):
inp = int(input())
user_values.append(inp)
output_ints_less_than_or_equal_to_threshold(user_values,user_values[n])
def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):
for i in user_values:
if i <= upper_threshold:
print(i,end=" ")
get_user_values()
Explanation:
This defins the get_user_values() method; it receives no parameter
def get_user_values():
This initializes user_values list
user_values = []
This gets the number of inputs
n = int(input())
This loop is repeated n+1 times to get all inputs and the upper threshold
for i in range(n+1):
inp = int(input())
user_values.append(inp)
This passes the list and the upper threshold to the output..... list output_ints_less_than_or_equal_to_threshold(user_values,user_values[n])
This defines the output.... list
def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold):
This iterates through the list
for i in user_values:
If current element is less or equal to the upper threshold, the element is printed
if i <= upper_threshold:
print(i,end=" ")
The main method begins here where the get_user_values() method is called
get_user_values()
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
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)).
on a client server network clients and servers usually require what to communicate?
Answer:
A connectivity device. Your colleague, in describing the benefits of a client/server network, mentions that it's more scalable than a peer-to-peer network.
Explanation:
write a python program to calculate the average of the given number
Answer:
The program in Python is as follows:
n = int(input())
sum = 0
for i in range(n):
num= float(input())
sum+=num
print("Average: ",sum/n)
Explanation:
Required
Average of numbers
The explanation is as follows:
This prompts the user for the count of numbers, n
n = int(input())
Initialize sum to 0
sum = 0
Iterate through n
for i in range(n):
This gets input for each number
num= float(input())
This calculates the sum of all inputs
sum+=num
This calculates and prints the average of all inputs
print("Average: ",sum/n)
. It has been said that technology will be the end of management. Maybe. How about artificial intelligence
Answer:
Yes
Explanation:
Artificial Intelligence is just a subcategory of Technology. That being said, if any type of technology has the ability to do the job of a human being in the management sector of a company it would be Artificial Intelligence. This is because AI is designed to be able to analyze data, discover patterns, and make decisions based on those patterns. These decisions are incredibly sophisticated, efficient, and made incredibly fast. It also learns the more that it makes decisions, therefore increasing its efficiency the more that it does a specific task. This would represent the same tasks that management is responsible for getting done, but the AI is able to do it faster, cheaper, and more efficiently. So, yes, AI is very capable of bringing the end of management.
What advice would you give to the students in the grade behind you?
If you could do one over for this school year, what would it be?
What is 4÷15-18×27.6
Learning Task 1: In a short bond paper, copy and answer the task. Identify the
materials, tools and equipment used in the following fashion accessories.
Materials
Tools
Equipment
Answer:
im solving now
Explanation:
What is this? pls answer if you know
Answer:
LV. 200Explanation:
:::::::::::::::::/
suppose a cpu has 16 data pins. How many operations will it take to read a 64 bit word.
List three authentication questions (but not the answers) a credit card company could ask to authenticate a customer over the phone. The questions should be ones to which an impostor could not readily obtain the answers. How difficult would it be for you to provide the correct answer vs a malicious actor
Answer:
Explanation:
Security questions need to be very personal and very specific so that only one individual knows them. Some example questions would be the following...
What are the last 4 digits of your Social Security Number? ... every US citizen has a social security number and it is very personal document that only the owner should have access to.
What is the street name where you lived when you opened the account? ... on average a person moves 12 times in their lifetime, therefore, very few people would know the exact address where you lived when you opened the account.
What is your mother's maiden name? ... This is a common question asked by banks and financial institutions because most people will not know your mother and even less will know her maiden name. Therefore, it is a very good security question.
These are all questions that a bank will have the answers too and know if you are telling the truth or not, but are also questions that would be extremely difficult for anyone else to obtain. Mainly since some require a personal long time connection with you while others require very personal information which no one shares.
Which commands (constructs) do NOT have a loop when expressed in syntax graphs? Select all that apply Group of answer choices if-then-else switch (expr) { case value: statements ;} for ( ; ; ) {} while (condition) do {statements;}
Answer:
if-then-else
switch (expr) { case value: statements ;}
Explanation:
Required
Which do not represent loop
Literally, looping means repeating an action or sequence of actions as long as a given condition is true.
For options (a) to (d), we have:
(a): if-then-else:
if statements are used to test conditions; depending on the truth or falsity of the condition, only one block of code can be executed at once.
In summary, if statements are not loops
(b): switch statements
This is an alternate to if statements and can be used in place of if statements.
Hence, switch statements are not loops
(c) and (d): for and while:
The above represent loops, because they both involve repetition of operations until the condition is no longer satisfied.
As you continue to build the help desk, you want to ensure that all of the tools are in place and that the analysts have the tools needed to resolve issues as they are reported. First, you want to understand and be able to report what the steps in problem solving entails. The following are common steps when solving issues:Identifying the problemDetermining the cause of the problemGenerating optionsEvaluating and prioritizing optionsDetermining a course of actionDescribe each step in detail, and discuss the issues and deliverables that exist at each step. To help ensure that the infrastructure is in place for the analysts, describe what technologies need to be in place at each step for you to enable your help desk analysts.
Answer:
):
Explanation:
For each of the following application areas state whether or not the tree data structure appears to be a good fit for use as a storage structure, and explain your answer: a. chess game moves b. public transportation paths c. relationship among computer files and folders d. genealogical information e. parts of a book (chapters, sections, etc.) f. programming language history g. mathematical expression
Answer:
a) Chess game moves:- Tree data structure is not a good fit.
b) Public transportation paths:- Tree data structure is not a good fit.
c) Relationshi[p among computer files and folders:- Tree data structure is a good fit.
d) Genealogical information:- Tree data structure is a good fit.
e) Parts of books:- Tree data structure is a good fit.
f) Programming language history:- Tree data structure is not a good fit.
g) Mathematical expression:- Tree data structure is a good fit.
Explanation:
a) Chess game moves:- Tree data structure is not a good fit. Since in tree data structure moving backward or sharing the node is not that much easy. Presume, In chess, you have to check any box is empty or not. Here, Graph is the best fit.
b) Public transportation paths:- Tree data structure is not a good fit. whenever shortest path, routes, broadcast come always graph is a good option. Because in the tree you don't know how many time you visit that node
c) Relationshi[p among computer files and folders:- Tree data structure is a good fit. Since they have a predefined route. Go to 'c' drive. Open a particular folder and open a particular file.
d) Genealogical information:- Tree data structure is a good fit. Since genealogical information also has a predefined route. Here, the Graph is not suitable.
e) Parts of books:- Tree data structure is a good fit. Since manages the chapters and topics are not that much complex. You can see any book index which is in a very pretty format.
f) Programming language history:- Tree data structure is not a good fit. To store the history of the programming language we need some unconditional jumps that's why the tree is not suitable.
g) Mathematical expression:- Tree data structure is a good fit. The tree is suitable in some cases. We have an expression tree for postfix, prefix.
Which event took place in the 1990s?
The first computer virus was launched.
O More people begin using the internet.
O Hackers developed fast-morphing malware.
O Hackers deployed the first known hacking attempt.
Honestly the only thing close to an answer is that more people have started using the internet. The internet was originally established in 1983 on January 1st.
Fun fact the communication is called Transfer Control Protocol/Internetwork Protocol
Also known now as TCP/IP
The event took place in the 1990s will be more people began using the internet. Then the correct option is B.
What is the internet?The Internet is said to have its formal birthday on January 1, 1983. Before this, there was no common method for connecting many computer networks. Transfer Control Protocol/Internetwork Protocol (TCP/IP) is a brand-new connection-oriented protocol.
This made it possible for various computer types connected to various networks to "speak" to one another.
The escalation of the Cold War served as another impetus for the advancement of the Internet. The Sputnik communications satellite by the Soviet Union prompted the U.S. Intelligence Community to think about how information may continue to be shared even following a nuclear assault.
More individuals started utilizing the internet at the time the incident occurred in the 1990s. Then, choice B is the best one.
More about the internet link is given below.
https://brainly.com/question/16721461
#SPJ2
You are in charge of five software development projects. The ‘characteristics’ of each of your projects are as follows:
• Project 1: Web-site for a local company. Relatively small system. Requirements are unclear and likely to change in the near future.
• Project 2: A very large embedded system whose requirements can be easily identified and are relatively stable.
• Project 3: A ‘standard’ business application. You have developed similar systems like this one in the past.
• Project 4: A relatively complex administrative system for one of the local hospitals. Some of the requirements seem to be pretty unclear, but all the requirements are stable.
• Project 5: A small real-time control system to be used for monitoring patients in a local hospital.
Consider the following software development approaches/models: waterfall, throw-away prototyping, evolutionary prototyping, component-based development, formal development. Which of the above approaches/models would you choose for each of your projects? Briefly explain your choices.
Write a program with a function that accepts a string as an argument and returns the number of uppercase, lowercase, vowel, consonants, and punctuation that the string contains. The application should let the user enter a string and should display the number of uppercases, lowercases, vowels, consonants, and punctuations that the string contains.
Answer:
Explanation:
The following code is written in Python. It is a function called checkString that takes in a string as an argument and loops through each char in that string and checking to see if it is lowercase, uppercase, vowel, consonant, or punctuations. It adds 1 to the correct variable. At the end of the loop it prints out all of the variables. The picture below shows a test output with the string "Brainly, Question."
def checkString(word):
uppercase = 0
lowercase = 0
vowel = 0
consonants = 0
punctuation = 0
vowelArray = ['a', 'e', 'i', 'o','u', 'y' ]
consonantArray = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z']
punctuationArray = ['.', '!', '?', ',', ';', '(', ')']
for char in word:
if char.isupper():
uppercase += 1
else:
lowercase += 1
if char.lower() in vowelArray:
vowel += 1
elif char.lower() in consonantArray:
consonants += 1
if char in punctuationArray:
punctuation += 1
print('Uppercase: ' + str(uppercase))
print('Lowercase: ' + str(lowercase))
print('Vowels: ' + str(vowel))
print('Consonants: ' + str(consonants))
print('Punctuations: ' + str(punctuation))