Answer:
Explanation:
The following program is written in Java and is a function that asks the user for an input and keeps doing so until a negative value is entered, in which case it calculates the average and max values and prints it to the screen.
public static void average () {
int num;
int sum = 0;
Scanner in = new Scanner(System.in);
System.out.println("Enter Number");
num = in.nextInt();
int count = 0;
int max = 0;
while(num >= 0)
{
sum+=num;
System.out.println("Enter Number");
num = in.nextInt();
count++;
if(num>=max){
max = num;
}
}
System.out.println(sum/count);
System.out.println(max);
}
Answer:hi
Explanation:
Which of these devices collects the most information on network activity?
a. Intrusion detection systems.
b. System Event Management systems.
c. Firewalls.
d. Packet sniffers.
Answer:
The devices collects the most information on network activity are:
d. Packet sniffers.
Explanation:
Generally, a packet sniffer is a monitoring device which examines streams of data packets that flow between computers on a network and the larger Internet. One of the best packet sniffers is the Wireshark. As a packet sniffer, the Wireshark is also an analysis tool. It captures network traffic on local networks, storing the obtained data for offline analysis.
Which of the following variable names follows the rules for naming variables?
A. snack $
B. favorite_snack
C. lunch time
D. 15 minute snack
Write a list comprehension statement to generate a list of all pairs of odd posi
Answer:
Print([(a,b) for a in range(10) for b in range(10) if (a < b and a%2 == 1 and b%2 == 1)])
Explanation:
Here, we declared a range of value for a and b using a for loop and the range function. The values are the first 10 numeric digits. The we used the if statement to establish our constraints;
In other to ensure that ;
Lower digit is written first ; (a < b) ;
Only odd numbers are considered,
a%2 == 1 ; b%2 == 1 (remainder when a and b are divided by 2 is 1.
Both a and b are declared as a tuple in other to obtain a pair of odd values.
please help
Write a method that takes 5 ints as parameters and returns the average value of the 5 ints as a double.
This method must be named average() and it must have 5 int parameters. This method must return a double.
Calling average(1, 5, 7, 4, 10) would return 5.4.
Answer:
Answered below
Explanation:
This solution is written in Kotlin programming language.
fun average (a: Int, b: Int, c: Int, d: Int, e: Int) : Double {
#variable to hold the addition of all parameters
var sum = a + b + c + d + e
#variable to hold the average of sum
var avg = sum / 5
return avg
}
#call the function to see how it works.
# this operation is done in the fun main()
var test: Double = average ( 5, 4, 7 , 3, 9)
print (test)
what type of device is a projector ?
a. input
b. memory
c. output
d. storage
Answer:
output
Explanation:
if I'm wrong sorryyy
Answer:
Output
Explanation:
:D
What will the output of the statements below? System.out.println(9%2); System.out.println(12%6); The output of the first statement is * The output of the second statement is
Answer:
You get Exact 30 print of that sentence on a comadore 64
Explanation:
Just simple basic science. hope this helps
. Else-if is good selection statement that help us to solve problems in C++,mostly times same problem of same nature can also be solved via switch statement. Which one you prefer to use and why?
Answer:
Else-If statements
Explanation:
Personally, I prefer using Else-If statements for conditional statements since you can start with and If statement and add to it if necessary. Aside from this, Else-If statements also allow you to add more than one condition to be met by using tags such as and or and not. Switch statements are better in scenarios where you have a set of possible inputs or results and need a specific event to happen for each input/result, but this is not as common of a scenario so Else-If is usually my go-to conditional statement.
Which of the following terms best describes the product development life cycle process?
descriptive
iterative
Static
evaluative
Answer:
D
Explanation:
Evaluative
What are the top ten famous games in the U.S.
Why? cause I wanna know :D
Minecraft
Fortnite
Rob.lox
GTA V
Rocket league
League of legends
Mario bros
GTA
Among us
Call Of Duty
What is the output of the following program
#include
int toronto (int x)
{
int w;
if (x == 0) w = 1; else w = toronto (x-1);
return (w);
}
int main (void)
{
int a = 2;
printf ("%d", toronto (a));
return (0); }
a. 0
b. 1
c. 2
d. -1
e. none of these
Answer:
The output is 1
Explanation:
Analysing the flow of program (We start from the main method)
The main begins here
int main (void) {
This line declares a as integer and also initializes it to 2
int a = 2;
This line passes 2 to the function names toronto and also prints the result of the function
printf ("%d", toronto (a));
return (0); }
The toronto function begins here.
Note that the function receives 2 as its argument and this is saved in variable x
int toronto (int x) {
This declares w as integer
int w;
If x is 0, w equals 1
if (x == 0) w = 1;
If otherwise
else
This reduces x by 1 and performs a recursion
w = toronto (x-1);
return (w);
}
Because of the structure of the if condition in the toronto function, the function will be repeated until x is 0.
And when x = 0; w = 1
This returns w (i.e. 1) back to the main function where 1 is printed as the output
return (w);
The motherboard
allows the different parts of a computer to communicate
helps to keep things cool inside the tower
is the memory of the computer
is where the computer is plugged into an outlet in the wall
Answer:
a:(allows the different parts of a computer to communicate)
Explanation:
The motherboard is the main command center for the whole pc which recieves your inputs and responds by sending outputs...
What is the correct term for a piece of malware that hides inside a legitimate software program or file from trusted sources
Answer: Trojan horse
Explanation:
Based on the Greek legend of how Greek soldiers hid in a Trojan horse to infiltrate and destroy Troy from within, Trojan horse malware mirrors this attack when attacking software.
It hides inside and disguises itself as a legitimate software program or a file from a trusted source and then when clicked on, it works to infect the software.
How to format each dictionary item as a text string in the input file. How to covert each input string into a dictionary item. How to format each item of your inverted dictionary as a text string in the output file.
Answer:
- To get the items of a dictionary and print them as a string, use the items() method to unpack the keys and values in a for and print or write them into a file.
for key, value in mydict.items():
print(f"{key}, {value}")
- To convert string from user input into dictionary;
mystring = input().split(" ") #assuming the words are separated by a space.
from word in mystring:
mydict[word] = mydict.get(word, 0) + 1
This would use the words in the string as the keys of the dictionary and the count of each word as the respective values.
Explanation:
A dictionary is a data structure in python used to store data in key-value pairs. The items are enclosed in curly braces and can be accessed with the key in dot or bracket notation.
Dictionaries in Python are used to represent data items in pairs; i.e. key and values
(a) Format items as strings in an input file
To do this we make use of the file manipulation.
Assume the dictionary name is given as: myDict
See attachment for the complete solution
Read more about Python dictionary at:
https://brainly.com/question/14353514
The ________ contains links to folders and files that Windows determines you access frequently or links that you have added.
Answer:
Quick access list
Explanation:
Normally in computers, quick access list is usually the first node in the navigation pane and it contains links to folders and files that you access frequently plus the ones that you add by yourself. Windows detects them.
What are the three general methods for delivering content from a server to a client across a network
Answer:
Answered below.
Explanation:
The three general methods consist of unicasting, broadcasting and multicasting.
Casting implies the transfer of data from one computer (sender) to another (recipient).
Unicasting is the transfer of data from a single sender to a single recipient.
Broadcasting deals with the transfer of data from one sender to many recipients.
Multicasting defines the transfer of data from more than one sender to more than one recipients.
NEED HELP WILL MARK BRAINLIEST 25 POINTS FOR ANSWER
Which option is typically only used when utilizing self joins?
display name
alias
relationship
primary key
Answer:
relationship
Explanation:
Answer:
I agree the should be C)relationship
Explanation:
edg 2021
What is the difference between a programming language and natural (every-day) language?
A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by
O clicking on the View tab.
O saving a contact.
O creating an appointment.
O flagging an email.
A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by clicking on the View tab. Thus, option A is correct.
What is a Variable Expense?Business expenses can be classified as either fixed (invariable) or variable. A fixed expense does not change based on a business’s other activities. Costs like rent and administrative salaries are fixed costs, which remain the same no matter how much a business is producing. Imagine a factory that produces pencils — the cost of renting the factory building will remain the same, month after month, no matter how many pencils the company actually produces.
Variable expense ratio expresses variable expenses as a proportion of a company's sales. To calculate the variable expense ratio, simply divide the company's total variable expenses by the company's total net sales. To express the result as a percentage, simply multiply it by 100.
Therefore, A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by clicking on the View tab. Thus, option A is correct.
Learn more about variable expense on:
https://brainly.com/question/13097236
#SPJ5
when you tried to login to server your trail may faild this failure event is recorded in
Complete the getOdds method so it returns a new ArrayList of Integers containing all odd Integers from the parameter ArrayList vals in the order they originally appeared. The contents of vals should not change. For example if an ArrayList containing the Integers 2, 5, 8, 6, 7, 3, 12 in that order is passed as a parameter to getOdds, it should return an ArrayList containing the Integers 5, 7, 3 in that order. Write your getOdds method in the U7_L2_Activity_Three class. Use the runner class to test your method but do not add a main method to your U7_L2_Activity_Three.java file or your code will not be scored correctly.
Answer:
Answered below
Explanation:
//Program is written in Java programming language.
public ArrayList<Integer> getOdds( ArrayList<Integer> list){
// Create variables to hold the new list and the //indexes.
int i;
ArrayList<Integer> oddList = new ArrayList<Integer>()
//Loop over the list and add every odd element // to the new list
for ( i = 0; i < list.length; I++){
if ( list[i] % 2 != 0){
oddsList.add(list[i])
}
}
return oddList;
}
The programming interface for a legacy motor controller accepts commands as binary strings of variable lengths.
a. True
b. False
Answer:
The answer is "Option a"
Explanation:
The given question is incomplete, that's why its correct solution can be defined as follows:
The above-given question is the part of the Binary Autocomplete, in which this Autocomplete function would be a full word or sentence after just a few other letters were entered into the system. It approach improves text taking appropriate on smartphone devices of particular because every letter should not be written in such a single phrase.
The ______________ shows that you have fully researched the topic and gives you a chance to prove your claim.
a
Conclusion
b
Introduction
c
Counterclaim
d
Topic Sentence
Question 9 (5 points)
Answer:
D. Topic Sentence
Explanation:
WHAT TYPES OF ACTIVITIES ARE PERFORMED BY HEALTH CARE SOFTWARES
Answer:
lectronic Health Record (EHR) Software. ...
Medical database software. ...
Medical research software. ...
Medical diagnosis software. ...
Medical imaging software. ...
E-prescribing software. ...
Telemedicine software. ...
Appointment scheduling (booking) software.
Buying a new computer for which of these reasons is most likely a sound
financial decision?
A. You liked the ad for it on TV.
B. You need it to do your homework.
O c. Your friend has one.
D. You were persuaded by a salesperson.
Answer:
b. you need it to do your homework
Explanation:
Choose the type of collection created with each assignment statement
____ collection A = {5:2}
Options: tuple, dictionary, list
____ collection B = (5,2)
Options: tuple, dictionary, list
____ collection C = [5,2]
Options: tuple, dictionary, list
Answer:
dictionary
tuple
list
Explanation:
a term to describe article that can be displayed in their entirety as opposed to abstract and reference only?
Answer:
would it be term and tequnique?
Explanation:
oooooooo
Select all the correct answers. Which statement will print the output 10 + 20=30
a. System.out.println("10 + 20 =30" );
b. System.out.println(10 + 20 =30);
c. System.out.println(10 + 20 =""+ (10+20));
d. System.out.println("10 + 20" =10+20);
e. System.out.println(10 + 20 ="" +10 +20);
Answer:
a
Explanation:
b will print out a boolean, true, i think
c gives an error?? i think
d seems weird
e is weird too
anyway, b,c,d,e all have bad syntax
Answer:
a
Explanation:
Brian has created the following selection sort class in Java. In which line is the index of the smallest value returned? In which line is the input array given as an argument?
public class SelectionSort{
private static int positionMin (int] vals, int startPosition) {
int minPosition startPosition;
for (int i startPosition; i
if (vals[i] vals[min Position]) {
minPosition = i;
return min
Position; private static void swap(int] vals, int firstPosition, int secondPosition) {
int temp; temp vals[firstPosition];
vals[firstPosition] vals[second Position];
vals[secondPosition] temp return public static void selSort(int| vals) {
int minPos for (int startPos 0; startPos< vals.length; startPos++){
minPos positionMin(vals,startPos); swap(vals,startPos, min Pos) ;
for (int i 0; i< vals.length; i++) { if(i
}else Jelse { System.out.println(vals[i]); } }; }
return; } }
Answer:
Explanation:
Since there are no line numbers in this question I will start counting from public class SelectionSort{ as line 1 and so on, as well as provide the code on that line.
The index of the smallest value is returned on line 8 where it says return min which shouldn't have any spaces and should be return minPosition;
The input array is given as an argument at the beginning of the function on line 2 where it says private static int positionMin (int] vals, int startPosition) {, as the variable vals.
This input array is also used as an argument on line 10 where it says Position; private static void swap(int] vals, int firstPosition, int secondPosition) and line 15 where it says vals[secondPosition] temp return public static void selSort(int| vals) {
Define a class named person that contains two instance variables of type string that stores the first name and last name of a person and appropriate accessor and mutator methods. Also create a method named displayDetails that outputs the details of a person
Answer:
Answered below
Explanation:
//Program is written using Java programming language.
Class Person {
private string firstName;
private string lastName;
void set firstName(string a){
firstName = a;
}
string getFirstName(){
return firstName;
}
void setLastname( string b){
lastName = b;
}
string getLastName( ){
return lastName;
}
void displayDetails( ) {
System.out.print(firstName);
System.out.print (lastName);
}
}
//Test program
Class Main{
public static void main(String args [] ){
Person person = new Person( )
person.setFirstName("Karen")
System.out.print(person.getFirstName)
person.displayDetails()
}
}
A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one child class (subclass) C) A class cannot have a parent class (superclass) D) A class cannot have a child class (subclass) E) A class can have multiple parent classes (superclasses)
Answer:
The answer is A)
Explanation:
In programming languages like java you can only use single inhertance meaning a class can only inherit attributes from one class. But in other languanges like C you can have multiple inhertance