Identify at least 6 errors from the following program code. Write all the errors and rewrite the correct program.(11 pts)

1. public E2
2. {
3. Public static void main(String )
4. {
5. System.Out.Println(“hello)
6. }

Answers

Answer 1

Answer:The code after rearrange the question segment:

public class Q// Class declaration of Q name.

{// Open the class body.

    public static void main(String[] a) // Main function declaration.

{ //Open the main-function body.

           System.out.println("Q"); // Print statement which print Q.

} //close the main-function body.

}//close the class body.

Output:

Q

Explanation:


Related Questions

Cloud computing security risks

Answers

Answer:

Risks:

Network issues or outages caused by attackers can limit or completely deny access to data stored in the cloud

Attackers could find an exploit and steal company data without ever physically touching the company's computer.

That's what I can think of.

Explanation:

design an algorithm to generate the first n terms of sequence 2,6,10,14​

Answers

Answer:

#Begin

a=2

k=0

temp=0

#Input

k=input()

temp=k

k=0

#Processing

while int(k)<int(temp):

print(a)

a=a+4

k=k+1

In this exercise, using the knowledge of computational language in python, we have that this code will be written as:

The code is in the attached image.

What is range?

The Python range function is a function native to the Python language that is used to generate a numerical sequence within a given range. It is normally used as an auxiliary to the for function. In Python, we can repeat an action a specified number of times using a for loop with the range function.

We can write the python  as:

a=2

k=0

temp=0

k=input()

temp=k

k=0

while int(k)<int(temp):

print(a)

a=a+4

k=k+1

See more about python at brainly.com/question/13437928

What are the best legendary pokemon?

Answers

PICACHU PICACHUUUUUUUUUU

Answer:

Any EX

Any GX

Pikachu

Raichu

Mew Two

Charizard

Taurus

Gumshoos

Lurantis

Lapras

Incineroar

Dialga

Guzzlord

Lugia

Darkrai

Sigilyph

Xerneas

Explanation:

There are more but it takes a little while to get them all

Animations
Animations are !
Blank which can be Applied to blank in a presentation?

Answers

Animation is a graphic element that depicts movement. Animations are visual effects applied to individual items on a slide

Example of vector image format​

Answers

Answer:

JPEGs, GIFs and PNGs are common raster image types. ...

Vector images, alternatively, allow for more flexibility. Constructed using mathematical formulas rather than individual colored blocks, vector file types such as EPS, AI and PDF* are excellent for creating graphics that frequently require resizing.

Design a program named GradeDistribution.java that reads in 10 grades from the keyboard, then counts and displays grade distribution as follows:

Grade Range No.
[90 - 100] 2
[80 - 89] 5
[70 - 79] 1
[0 - 69] 1
Others 1

Answers

Answer:

[70 — 79]

Explanation:

Write a program that reads a list of integers, and outputs the two smallest integers in the list, in ascending order. The input begins with an integer indicating the number of integers that follow. You can assume that the list will have at least 2 integers and fewer than 20 integers. Ex: If the input is: 5 10 5 3 21 2

Answers

Answer:

Follows are the code to the given question:

#include <iostream>//header file  

using namespace std;

int main() //main method

{

int nums[20];//defining an array

int n,i,k;//defining integer variables

cout<<"Enter total number you want to insert: ";//print message

cin>>n;//input value of n  

cout << "Enter array numbers: " << endl;//print message

for (i = 0;i<n;i++) //defining for loop for input values from user-end

{

   cin >> nums[i];//input values

}

for (i = 0; i < n;i++) //defining for loop for count array values

{

   for (k =i+1;k<n;k++)//defining for loop for arrange value in ascending  order  

   {

       if (nums[i] > nums[k])//checking first and second value

       {

           int t = nums[i];//defining integer variable that hold first element value in t

           nums[i] = nums[k];//holding second element value in first element

           nums[k] = t;//assign value in t

       }

   }

}

cout<<"Two smallest number in list are:";//print message

 for (i = 0; i <2; ++i)//defining for loop that prints first two smallest value  

     cout<<nums[i]<<" ";//print value

   return 0;

}

Output:

Enter total number you want to insert: 6

Enter array numbers:  

5

10

5

3

21

2

Two smallest number in list are:2 3  

Explanation:

In this code, an integer array "nums" is defined, and in the next step multiple integer variable is defined, that uses the for loop input value from the user-end, and in the next step, another two for loop is declared, that uses if block to arrange value into the ascending order at which it stores two smallest value in first and second position in the array element, and in the next step, it uses another for loop to print its element value.

A computer connected to the internet that ask for data is a

Answers

Answer:

Client

Explanation:

When your computer is connected to the internet it is always asking and sending data. Your computer is the client which recieves the data from the sever.

Discuss the important role of remote sensing application in agriculture. Do you think that the use of remote sensing is applicable in the Philippines scenario? Why? Give some of the pros and cons of remote sensing.​

Answers

Answer:

Remote sensing gives the soil moisture data and helps in determining the quantity of moisture in the soil and hence the type of crop that can be grown in the soil. ... Through remote sensing, farmers can tell where water resources are available for use over a given land and whether the resources are adequate.

Please read this lab exercise thoroughly, before attempting to write the program.

Write a program that reads the pairs of group number and student count from the text file (user must enter name of file) and:

Displays the number of groups in the file (5 %)
Displays the number of even and odd student count (5%)
Displays the sum of the even student count and the sum of the odd student count as well as the sum of all the student count (5%)
Displays the group numbers of the largest student count and the smallest student count (5 %)
Computes the average of the largest and smallest student count (10 %)
Compute the sum of ALL the digits in the largest student count (i.e. 952 – Sum is 9+5+2 = 16) (15 %)
Assume the contents of the file are as follows but that the pairs of data can change later:

1 25

2 123

3 475

4 61

5 77

6 910

7 234

8 138

9 134

10 95

11 674

12 345

13 31

14 211

15 952

16 873

17 22

18 7

19 876

20 347

21 450

The following is a sample output: User input in red

What is name of the input file? integers.dat

The number of groups in the file is 21

There are 12 odd student count and 9 even student count

The sum of the odd student count is 2645

The sum of the even student count is 4390

The sum of all the student count is 7035

The group number of the largest student count is 15

The group number of the smallest student count is 18

The average of 952 and 7 is 479.5

The sum of all the digits in the largest student count is 16

NOTE:

Use two decimal point precision for the average
To check your code, adjust one of the student count in the file, recompile your code and run again (suggest changing the largest or smallest student count )
Even though there are 21 pairs of numbers in the file, the program should NOT presume there will always be 21 pairs of numbers. In other words, you should not solve this problem by declaring 21 pairs of values. If I choose to use another integers.dat file other than the one provided with the assignment, your program should still work correctly with that file as well. All you can assume is that a series of integers will be read in from the file. Therefore, you need to implement a solution that uses the repetition control structures (for, while, do…while) in the reading and processing of these values to produce your output.

Answers

Answer:

filename = input("Enter input file? ")

with open(filename, 'r') as data:

num_groups = []

num_counts = []

for line in data:

 cols = line.split()

 num_groups.append(int(cols[0]))

 num_counts.append(int(cols[1]))

print("The number of num_groups in the file is "+str(len(num_groups)))

c_even = 0; c_odd = 0; s_odd = 0; s_even = 0

for i in num_counts:

if i%2 == 0:

 c_even=c_even+1

 s_even = s_even + i

else:

 c_odd=c_odd+1

 s_odd = s_odd + i

print("There are "+str(c_odd)+" odd student and "+str(c_even)+" even student")

print("The sum of odd student is "+str(s_odd))

print("The sum of even student is "+str(s_even))

print("The sum of all student is "+str(s_even+s_odd))

max_count = num_groups[num_counts.index(max(num_counts))]

print("The group number of the largest student is "+str(max_count))

min_count = num_groups[num_counts.index(min(num_counts))]

print("The group number of the smallest student is "+str(min_count))

print("The average of "+str(max(num_counts))+" and "+str(min(num_counts))+" is:",end=" ")

print("%.2f" % ((max(num_counts)+min(num_counts))*0.5))  

bigkount = str(max(num_counts))

bigsum = 0

for i in range(len(bigkount)):

bigsum += int(bigkount[i])

 

print("The sum of all the digits in the largest student is: "+str(bigsum))

Explanation:

The program was written in Python.

Because of the length, I added an attachment where I used comments to explain the lines of the code

Other Questions
PLEASE HELP WILL GIVE BRAINLIESTAri is designing a patio that will be 20 feet long and 16 feet wide. He makes a scale drawing of the patio using a scale of 1 inch to 4 feet.The ratio of the area of the scaled drawing to the actual area of the patio is 1 square inch to _____ square feet. Which method for achieving civil rights is most associated withMartin Luther King, Jr.? Choose one of the answers below andexplain why you chose that answer How do you name ethers in chemistry? Having emergency supplies ready is an important step in any preparedness plan. In the space below, draw an example of what your emergency supply pack would look like. Make sure to label each item so that others can see your materials. Renee bought 7 potatoes at the supermarket. The shortest diameter of each, in centimeters, is shown below What happens to the pitch when the frequency of a sound wave decrease?A it stays the sameB it decreases by that same amountC it increases twice the amountD it increases by the same amount A picture frame is 112 inches wider than the picture it holds. Let f represent the width of the frame. Let p represent the width of the picture. Which table represents the situation?f = p + 1p f1 22 33 4f = p + 12p f1 1122 2123 312f = p + 112p f1 2122 3123 412f = p + 3p f1 42 53 6 compare and contrast rocks and minerals. Question 20Why should I probably get my first credit card from the same institution that hasmy checking and/or savings account?A.Because building a relationship with a financial institution makes goodsense..You should not. You should get your first card at one of those really coolstudent websites.C.A better idea is to pick your credit card company based on which gift I likethe best.D. Because local institutions offer better gifts. someonepleasehelp me asap evaluate (8)-2(15-8) What is the antibody made during the second contact with an antigen called? On a standard coordinateplane, a point is locatedto the left of theorigin on the x-axis.Select ALL coordinatesthat could be thecoordinates of the point. a(0, -5) b(6, 0) c(-9, 0) d(-1, -1) e(-2, 0) f(1, 0) Enrique predicted his car payment to be $200 each month. His actual car payment is $225 each month. What is Enrique's percent errorPLEASE SHOW WORK Can someone please help me with the with this Please answer this correctly without making mistakes DUE TONIGHT, please help me i'm really confused and please show work.I will mark Brainly Do you think your friends and family love you because you are unique? Why ? Solve the propotionq/5 = 4/1 Cuatro meses despus que se detuviera la publicidad, una compaia fabricante notifica que sus ventas han caido de 100.000 unidades por mes a 80.000. Si las ventas siguen un patron de decrecimiento exponencial, cuantas unidades habra despues de los siguientes dos meses? andre and Elena are each saving money. Andre starts with $100 in his savings accountnd adds $5 per week. Elena starts with $10 in her savings account and adds $20 eachjeek.1. Write an equation in y= mx + b form to represent at what rate Elena and Andre areaving their money.Y=mx+b