Answer:
The program in Java is as follows:
import java.util.*;
public class Main{
public static int countPerfect(int [] scores, int n){
int count = 0;
for(int i = 0;i<n;i++){
if(scores[i] == 100) {count++;} }
return count; }
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n;
System.out.print("Number of scores: ");
n = input.nextInt();
if(n<1 || n>20){n=20;}
int [] scores = new int[n];
for(int i = 0;i<n;i++){
scores[i] = input.nextInt(); }
System.out.print("Perfect Scores: "+countPerfect(scores,n));
}
}
Explanation:
The countPerfect function begins here
public static int countPerfect(int [] scores, int n){
This initializes the count to 0
int count = 0;
This iterates through the array elements
for(int i = 0;i<n;i++){
If current score is 100, count is incremented by 1
if(scores[i] == 100) {count++;} }
This returns the value of count
return count; }
The main begins here
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
This declares the number of scores, n
int n;
Prompt to enter the number of scores
System.out.print("Number of scores: ");
This gets input for n
n = input.nextInt();
If input is less than 1 or greater than 20, n is set to 20
if(n<1 || n>20){n=20;}
This declares the scores as an array
int [] scores = new int[n];
This iterates through the array and get inputs for each score
for(int i = 0;i<n;i++){
scores[i] = input.nextInt(); }
This calls the function and print the number of perfect scores
System.out.print("Perfect Scores: "+countPerfect(scores,n));
}
An Excel file that contains one or more worksheets
Answer:
three sheets
Explanation:
A workbook is an Excel file that contains one or more worksheets. Each of the workbook 039;s worksheets are in separate tabs on the bottom of the Excel window. By default, a new Excel workbook will contain three worksheets.
Design a pseudo code that determines if a given number is even or odd number
The pseudocode determines if a given number is even or odd by checking if it's divisible by 2 and then prints the respective result.
Here's a simple pseudocode to determine if a given number is even or odd:
Input: number
Output: "Even" if the number is even, "Odd" if the number is odd
if number is divisible by 2 with no remainder then
Print "Even"
else
Print "Odd"
end if
This pseudocode checks whether the given number is divisible by 2. If it is, it prints "Even" since even numbers are divisible by 2. Otherwise, it prints "Odd" since odd numbers are not divisible by 2.
Learn more about pseudocode here:
https://brainly.com/question/17102236
#SPJ7
Does the security burden fall primarily on the user? On
the company that the user is doing business with? On
both? Support your answer.
Answer:
yes and no because of the security
Explanation:
yes and no because of the security
which of these css rules will add a margin only to the image in the div
Answer:
The answer is c I hope this helped
CSS, To specify the area around items, utilize the margin attribute. It has no backdrop color and is entirely translucent. It purges the vicinity of the element. Different characteristics can be used to individually adjust the top, bottom, left, and right margins. Thus, option C is correct.
What CSS rules will add a margin only to the image?You can provide an image to be used in place of the standard border surrounding an element using the CSS border-image property. Three elements make up the property: the picture that will be the border. Where to cut the picture.
Therefore, setting the top and left margins to zero will eliminate this margin. Similar to padding and border, margin-left, margin-right, margin-top, and margin-bottom allow you to customize the sizes of individual margin sides.
Learn more about CSS here:
https://brainly.com/question/17584518
#SPJ2
Marc is a gamer and is in the market for a new computer to support a lot of graphics. He needs to find a computer with a high amount of RAM, because the higher the RAM, the faster it will function.
A: True
B: False
Since Marc is a gamer and is in the market for a new computer to support a lot of graphics. He needs to find a computer with a high amount of RAM, because the higher the RAM, the faster it will function is option A: true statement.
What is the statement of the higher the RAM, the faster it will function about?In regards to computing, when the RAM is known to be faster, one can say also that the faster will be the computer the processing speed.
Note that when there is a faster RAM, a person or a computer user can be able to increase the speed through which the computer memory moves information to other parts of the system.
This implies that there is a fast processor and thus an equally faster means of talking to the other areas of the system, making the computer to be much more good.
Therefore, Since Marc is a gamer and is in the market for a new computer to support a lot of graphics. He needs to find a computer with a high amount of RAM, because the higher the RAM, the faster it will function is option A: true statement.
Learn more about RAM from
https://brainly.com/question/13196228
#SPJ1
Match the features of integrated development environments (IDEs) and website builders to the appropriate location on the chart.
Answer:
website builder
complex coding techniques and advanced programming languages.
Write a function "doubleChar(" str) which returns a string where for every character in the original string, there are two characters.
Answer:
//Begin class definition
public class DoubleCharTest{
//Begin the main method
public static void main(String [ ] args){
//Call the doubleChar method and pass some argument
System.out.println(doubleChar("There"));
}
//Method doubleChar
//Receives the original string as parameter
//Returns a new string where for every character in
//the original string, there are two characters
public static String doubleChar(String str){
//Initialize the new string to empty string
String newString = "";
//loop through each character in the original string
for(int i=0; i<str.length(); i++){
//At each cycle, get the character at that cycle
//and concatenate it with the new string twice
newString += str.charAt(i) + "" + str.charAt(i);
}
//End the for loop
//Return the new string
return newString;
} //End of the method
} // End of class declaration
Sample Output:TThheerree
Explanation:The code above has been written in Java and it contains comments explaining each line of the code. Kindly go through the comments. The actual lines of executable codes have been written in bold-face to differentiate them from comments.
A sample output has also been given.
Snapshots of the program and sample output have also been attached.
Are there measures that organizations and the U.S. government can take together to prevent both real-world terrorist violence and cyberattacks?
How laggy is you're game cause I even lag in offline games this is just a random question.
Answer: its bad
Explanation:
Answer:
Lagging in offline games suggests there is something wrong with the computer, not the internet. There are various speed tests you can use to determine the speed of your internet! One being https://www.speedtest.net/ which is a more well known and trusted site. Depending on how old your computer is or if it is a laptop not build for games can influence your gameplay experience greatly.
What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.edu
Answer:
Explanation:
ae
What formatting changes do spreadsheet applications permit in the rows and columns of a spreadsheet?
Row and Column Formatting Options
Formatting rows and columns is similar to cell formatting. In an OpenOffice Calc spreadsheet, you can format data entered into rows and columns with the help of the Rows and Columns options. You can insert rows and columns into, or delete rows and columns from, a spreadsheet. Use the Insert or Delete rows and columns option on the Insert tab. Alternatively, select the row or column where you want new rows or columns to appear, right-click, and select Insert Only Row or Only Column options.
You can hide or show rows and columns in a spreadsheet. Use the Hide or Show option on the Format tab. For example, to hide a row, first select the row, then choose the Insert tab, then select the Row option, and then select Hide. Alternatively, you can select the row or columns, right-click, and select the Hide or Show option.
You can adjust the height of rows and width of columns. Select Row and then select the Height option on the Format tab. Similarly, select Column, then select the Width option on the Format tab. Alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. You can also use the AutoFit option on the Table tab to resize rows and columns.
Formatting rows and columns in a spreadsheet is similar to cell formatting. In OpenOffice Calc, users can insert or delete rows and columns, hide or show them, and adjust the height and width of the rows and columns.
What is spreadsheet?A spreadsheet is an electronic document that stores data in a tabular format and is used to perform calculations and analysis. It is a type of software program designed to assist with data entry, calculations, and other analysis tasks. Spreadsheets often contain formulas and functions that allow users to quickly and accurately calculate values based on the data they enter. Spreadsheets also provide users with the ability to present data in an organized and visually appealing way. Spreadsheets are an essential tool for businesses, schools, and other organizations to help them make decisions, track progress, and manage resources.
Users can access these options from the Insert, Format, and Table tabs. Alternatively, they can select the row or column they want to format, right-click, and select the relevant option. Additionally, users can hold the mouse on the row or column divider and drag the double arrow to the desired position. The AutoFit option on the Table tab can also be used to resize rows and columns.
To learn more about spreadsheet
https://brainly.com/question/30039670
#SPJ1
Layla has been putting off her flip grid video required this week and she waited until the last hour to proofread and finalize a short essay what is Layla struggling with?
Answer:
Explanation:
Based on the given scenario, Layla is struggling with procrastination and time management. She has been delaying the task of creating her flip grid video and has waited until the last hour to proofread and finalize her short essay. This behavior suggests a difficulty in initiating tasks and managing time effectively. Layla may be facing challenges in prioritizing her work, planning ahead, and avoiding procrastination, which can lead to increased stress and a rushed approach to completing assignments.
Answer:
Layla is struggling with procrastination and time management as she has been putting off her flip grid video until the last hour and also finalizing a short essay during that time.
In what setting should a bidirectional microphone be used and why?
Bidirectional microphones have a very constricted pickup angle, making them useful for separating a single voice or mechanism in the presence of other sound sources, as lengthy as nothing is directly behind the mic. They are useful for picking up two sources that are next to each other.
What is bidirectional microphone?The pressure gradient principle underpins this type of microphone. The sound can travel through the membrane on both sides.
When the sound on the front and backside of the diaphragm differs, the microphone sends a signal.
Bidirectional microphones have a particularly narrow pickup angle, which makes them advantageous for distinguishing a single voice or framework in the involvement of other sound sources, as long as nothing is directly behind the mic.
They are useful for detecting two sources that are close together.
Thus, in this setting a bidirectional microphone can be used.
For more details regarding bidirectional microphone, visit:
https://brainly.com/question/14360530
#SPJ1
An __________ hard drive is a hard disk drive just like the one inside your, where you can store any kind of file.
An external hard drive is a hard disk drive just like the one inside your computer, where you can store any kind of file.
These drives come in various sizes, ranging from small portable drives that can fit in your pocket to larger desktop-sized drives with higher storage capacities. They often offer greater storage capacity than what is available internally in laptops or desktop computers, making them useful for backups, archiving data, or expanding storage capacity.
Overall, external hard drives are a convenient and flexible solution for expanding storage capacity and ensuring the safety and accessibility of your files.
Can you guys tell me what this script does in my game on lua
Lua scripting is used to dynamize forms and reports. It's a software workshop that allows you to create real database management applications.
Can you code games with Lua?Most of the code for the hugely popular game Angry Birds is written in Lua. Attend a presentation by Jaakko Lisalo at the 2011 Game Design Expo. With Lua, Snort, a well-known network intrusion prevention and detection system, may be scripted.
Lua can be used to script Celestia, a real-time 3D representation of space. As a programming language, Lua is not as challenging to learn as some others. After only a little bit of education, many students are able to start integrating it into their applications.
There are numerous options for pupils to learn Lua because it is such a well-liked and generally simple language. Game development is becoming more and more popular with the Lua programming language.
To learn more about Lua scripting refer to:
https://brainly.com/question/14523217
#SPJ1
Create a program using classes that does the following in the zyLabs developer below. For this lab, you will be working with two different class files. To switch files, look for where it says "Current File" at the top of the developer window. Click the current file name, then select the file you need.
(1) Create two files to submit:
ItemToPurchase.java - Class definition
ShoppingCartPrinter.java - Contains main() method
Build the ItemToPurchase class with the following specifications:
Private fields
String itemName - Initialized in default constructor to "none"
int itemPrice - Initialized in default constructor to 0
int itemQuantity - Initialized in default constructor to 0
Default constructor
Public member methods (mutators & accessors)
setName() & getName() (2 pts)
setPrice() & getPrice() (2 pts)
setQuantity() & getQuantity() (2 pts)
(2) In main(), prompt the user for two items and create two objects of the ItemToPurchase class. Before prompting for the second item, call scnr.nextLine(); to allow the user to input a new string. (2 pts)
(3) Add the costs of the two items together and output the total cost. (2 pts)
Here's the code:
The CodeItemToPurchase.java:
public class ItemToPurchase {
private String itemName;
private int itemPrice;
private int itemQuantity;
public ItemToPurchase() {
itemName = "none";
itemPrice = 0;
itemQuantity = 0;
}
public void setName(String name) {
itemName = name;
}
public String getName() {
return itemName;
}
public void setPrice(int price) {
itemPrice = price;
}
public int getPrice() {
return itemPrice;
}
public void setQuantity(int quantity) {
itemQuantity = quantity;
}
public int getQuantity() {
return itemQuantity;
}
}
ShoppingCartPrinter.java:import java.util.Scanner;
public class ShoppingCartPrinter {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
ItemToPurchase item1 = new ItemToPurchase();
System.out.println("Item 1");
System.out.println("Enter the item name:");
item1.setName(scnr.nextLine());
System.out.println("Enter the item price:");
item1.setPrice(scnr.nextInt());
System.out.println("Enter the item quantity:");
item1.setQuantity(scnr.nextInt());
scnr.nextLine();
ItemToPurchase item2 = new ItemToPurchase();
System.out.println("\nItem 2");
System.out.println("Enter the item name:");
item2.setName(scnr.nextLine());
System.out.println("Enter the item price:");
item2.setPrice(scnr.nextInt());
System.out.println("Enter the item quantity:");
item2.setQuantity(scnr.nextInt());
int totalCost = item1.getPrice() * item1.getQuantity() + item2.getPrice() * item2.getQuantity();
System.out.println("\nTotal cost: $" + totalCost);
}
}
This implementation creates two objects of the ItemToPurchase class, prompts the user for their names, prices, and quantities, calculates the total cost, and prints it out.
Read more about programs here:
https://brainly.com/question/26134656
#SPJ1
Assuming int numbers[SIZE]; is initialized somehow, write a function counter() that you can send the array to, plus an extra integer, and the function will return the number of times that value is found in the array. For example, if the array of SIZE 7 contains {1,2,3,2,3,3,3}then the call
x=counter(numbers,SIZE,3); will put 4 into x.
Answer:
Explanation:
The following function is written in Java and takes in three parameters the array, its size, and the chosenNumber that will be counted. The function then creates an instance variable called Counter and loops through the given array looking for the chosenNumber. Every time that the number is found in the array it adds 1 to the counter. Once the loop is done it returns the total value of the counter variable.
public static int counter(int[] numbers, int Size, int chosenNumber) {
int counter = 0;
for (int x = 0; x < Size; x++) {
if(numbers[x] == chosenNumber) {
counter++;
}
}
return counter;
}
1. What are the main features of IEEE 802.3 Ethernet standard?
Answer:
Single byte node address unique only to individual network. 10 Mbit/s (1.25 MB/s) over thick coax. Frames have a Type field. This frame format is used on all forms of Ethernet by protocols in the Internet protocol suite.
Explanation:
802.3 is a standard specification for Ethernet, a method of packet-based physical communication in a local area network (LAN), which is maintained by the Institute of Electrical and Electronics Engineers (IEEE). In general, 802.3 specifies the physical media and the working characteristics of Ethernet.
What is the difference between cipher block chaining mode and electronic code book mode?
Answer:
ECB (Electronic Codebook) is essentially the first generation of the AES. It is the most basic form of block cipher encryption.
CBC (Cipher Blocker Chaining) is an advanced form of block cipher encryption. With CBC mode encryption, each ciphertext block is dependent on all plaintext blocks processed up to that point.
write a psuedocode for entire class corresponding mark and result category, write class mark and create a module called "high" that will display the student name
The pseudocode for a class that includes corresponding marks and result categories goes as:
Pseudocode:
kotlin
Copy code
class Student:
attributes:
name
mark
method calculateResult:
if mark >= 90:
return "Excellent"
else if mark >= 60:
return "Pass"
else:
return "Fail"
class Class:
attributes:
students
method addStudent(student):
students.append(student)
method displayHighScorer:
highestMark = 0
highScorer = None
for student in students:
if student.mark > highestMark:
highestMark = student.mark
highScorer = student
if highScorer is not None:
print "High Scorer: " + highScorer.name
else:
print "No students in the class."
How to create a pseudocode for a class?The provided pseudocode outlines a class called "Student" that has attributes for name and mark. It includes a method called "calculateResult" to determine the result category based on the mark.
Another class called "Class" is created to manage a group of students. It has methods to add students and display the name of the highest scorer using a module called high.
Read more about pseudocode
brainly.com/question/24953880
#SPJ1
Ali receives an email from a person posing as a bank agent, who asks Ali to share his bank account credentials. Which type of network attack does this scenario indicate?
The network attack in this scenario is . This attack can occur .
Phishing is the type of network attack which this scenario indicates. This type of attack can take place via electronic messages.
What is network attack?
Network attacks are illegal activities on digital assets within an organization's network. Malicious parties typically use network assaults to change, destroy, or steal private data. Network attackers typically target network perimeters in order to obtain access to interior systems. In a network attack, attackers aim to breach the business network perimeter and obtain access to internal systems. Once inside, attackers frequently combine different forms of assaults, such as compromising an endpoint, propagating malware, or exploiting a weakness in a system within the network.
To learn more about network attack
https://brainly.com/question/14980437
#SPJ13
om/courses/50551/assignments/6635468
де
Illuminate Home Co...
A Lessons
G Image result for car...
G gonzales ca weathe...
google classroom
Ask the user to input an integer. Print out the next three consecutive numbers.
Sample Run
Enter an integer: 4
5
6
7
num = int(input("Enter an integer: "))
i = 1
while i <= 3:
print(num+i)
i += 1
I've written my code in python 3+. I hope this helps!
Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20.
The program performs the following tasks:
Read the file name of the tsv file from the user. Assume the file name has a maximum of 25 characters.
Open the tsv file and read the student information. Assume each last name or first name has a maximum of 25 characters.
Compute the average exam score of each student.
Assign a letter grade to each student based on the average exam score in the following scale:
A: 90 =< x
B: 80 =< x < 90
C: 70 =< x < 80
D: 60 =< x < 70
F: x < 60
Compute the average of each exam.
Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt. Output one student per row and separate the values with a tab character.
Output the average of each exam, with two digits after the decimal point, at the end of report.txt. Hint: Use the precision sub-specifier to format the output.
Ex: If the input of the program is:
StudentInfo.tsv
and the contents of StudentInfo.tsv are:
Barrett Edan 70 45 59
Bradshaw Reagan 96 97 88
Charlton Caius 73 94 80
Mayo Tyrese 88 61 36
Stern Brenda 90 86 45
the file report.txt should contain:
Barrett Edan 70 45 59 F
Bradshaw Reagan 96 97 88 A
Charlton Caius 73 94 80 B
Mayo Tyrese 88 61 36 D
Stern Brenda 90 86 45 C
Averages: midterm1 83.40, midterm2 76.60, final 61.60
Algorithmic Complexity: what is the asymptotic complexity (Big-O) of each code section? Identify the critical section of each.\ Line 1: for (int i=0; i<532; i++) { f(n) = O( ) Line 2: for (int j=1; j
Answer:
Check the explanation
Explanation:
1) f(n) = O( 1 ), since the loops runs a constant number of times independent of any input size
there is no critical section in the code, as a critical section is some part of code which is shared by multiple threads or even processes to modify any shared variable.This code does not contain any variable which can be shared.
2) f(n) = O( log n! ), the outer loop runs for n times, and the inner loop runs log k times when i = k,ie the total number of print will be – log 1 + log2 +log3 +log4+…...+ log n = log (1 . 2 . 3 . 4 . ……. . n ) =log n!
there is no critical section in the code, as a critical section is some part of code which is shared by multiple threads or even processes to modify any shared variable.This code does not contain any variable which can be shared.
Note : Log (m *n) = Log m + Log n : this is property of logarithm
3) f(n) = \(O( n^2 )\), since both outer and inner loop runs n times hence , the total iterations of print statement will be : n +n+n+…+n
for n times, this makes the complexity – n * n = n2
there is no critical section in the code, as a critical section is some part of code which is shared by multiple threads or even processes to modify any shared variable.This code does not contain any variable which can be shared.
What is the hyperlink for famous viruses ?
Answer: Hope this helps :)
Explanation: Viruses embedded themselves in genuine programs and relied on these programs to propagate. Worms were generally stand alone programs that could install themselves using a network, USB or email program to infect other computers.
Trojan horses took their name from the gift to the Greeks during the Trojan war in Homer’s Odyssey. Much like the wooden horse, a Trojan Horse looks like a normal file until some predetermined action causes the code to execute.
Today’s generation of attacker tools are far more sophisticated, and are often a blend of these techniques.
These so-called “blended attacks” rely heavily on social engineering - the ability to manipulate someone to doing something they wouldn’t normally do – and are often categorised by what they ultimately will do to your systems.
You installed a
new browser on your work computer because you no
longer wish to use the default browser provided with the
operating system.When you run the new browser, an error
message appears stating that a user name and password are
required to configure the firewall and allow this program
to access the Internet.Why has this happened?
Answer:
Not the admin
Explanation:
I believe this has to do with the user profile not being the administrator's profile, its asking for you to put in that information to show that the administrator of the laptop is allowing for the program to run on the laptop
At each step it should print out the move it makes and its performance score (e.g. S 0.2). Every 5 steps, it should print out a grid, with a "[ ]" on the square where the robot is now. Thus, with the above input, if the robot has done S U S L S, the output would be:
Answer:
The output would be S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]
Explanation:
Given that at each step output prints for example S 0.2.
Also given after every 5 steps, it should print a grid "[ ]".
if robot has been given S U S L S, it prints output as
S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]
in java please
In this exercise, you will need to create a static method called findString in the MatchingString class that should iterate over String[] arr looking for the exact match of the String that is passed as a parameter.
Return the index of the array where the String is found; if it does not exist in the array, return -1.
For example, if the word “Karel” is passed in, your method would return 1.
Answer:
Explanation:
The following code is written in Java. It is a static method that takes in a String parameter and loops through the String array called arr comparing each element in the array with the word parameter that was passed. If it finds a match the method returns the index of that word, otherwise it will return -1
public static int findString(String word){
int index = -1;
for (int x = 0; x < arr.length; x++) {
if (word == arr[x]) {
index = x;
break;
}
}
return index;
}
What is the output?
>>>import time
>>>time.localtime()
a. the number of seconds since the epoch
b. the user's time zone
c. the date
d. the time
e. the time-zone offset
It is a select all that apply type of question
Answer:
a. the number of seconds since the epoch
Explanation:
time.localtime(), returns the number of seconds since the epoch if no argument is passed oyherwise it return struct_time in local time if you pass in seconds since epoch
write an sql statement to display the warehouseid and the sum of quantityon-hand grouped by warehouseid. name the sum totalitemsonhand and display the results in descending order of totalitemsonhand. (provide the select script statement and screenshot) g
The command used in SQL statement is SELECT, SUM(), and DESC to display the warehouseid and the sum of quantityon-hand grouped by warehouseid and display the result in descending order.
What is command in SQL?Command in SQL is used as instructions to communicate the data in database.
The code is below,
SELECT warehouseid,
SUM(quantityon-hand) AS totalItemsonhand
FROM INVENTORY
GROUP BY warehouseid
ORDER BY totalItemsonhand DESC
First, we select the data that want to be displayed with SELECT command. Then SUM() command will sum all quantityon-hand from inventory in group warehouseid. Displayed result in descending order can be instructed by command DESC.
Since, we want to name it totalitemsonhand, then use AS command to rename the result of SUM() to totalitemsonhand.
Learn more about SQL here:
brainly.com/question/25694408
#SPJ4