Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print:
7 9 11 10 10 11 9 7
Hint: Use two for loops. Second loop starts with i = courseGrades.length - 1.
Note: These activities may test code with different test values. This activity will perform two tests, both with a 4-element array. Also note: If the submitted code tries to access an invalid array element, such as courseGrades[9] for a 4-element array, the test may generate strange results. Or the test may crash and report "Program end never reached", in which case the system doesn't print the test case that caused the reported message.
import java.util.Scanner;
public class CourseGradePrinter {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
final int NUM_VALS = 4;
int [] courseGrades = new int[NUM_VALS];
int i;
for (i = 0; i < courseGrades.length; ++i) {
courseGrades[i] = scnr.nextInt();
}
/* Your solution goes here */
}
}

Answers

Answer 1

Answer:

The missing part of the code is:

for (i = 0; i < courseGrades.length; ++i) {

           System.out.print(courseGrades[i]+" ");         }

       System.out.println();

       for (i = courseGrades.length-1; i >=0 ; --i) {

           System.out.print(courseGrades[i]+" ");         }

       System.out.println();

Explanation:

This iterates through the array

for (i = 0; i < courseGrades.length; ++i) {

This prints each element of the array followed by a space

           System.out.print(courseGrades[i]+" ");         }

This prints a newline at the end of the loop

       System.out.println();

This iterates through the array in reverse

       for (i = courseGrades.length-1; i >=0 ; --i) {

This prints each element of the array (reversed) followed by a space

           System.out.print(courseGrades[i]+" ");         }

This prints a newline at the end of the loop

       System.out.println();


Related Questions

What are the purposes of a good web page design?
The purpose of a good web page design is to make it
and

Answers

Answer:

functional and aesthetically pleasing/look nice

Answer:

Link and lokk nise and spell word correctly

Explanation:

Hope it help if im wrong im sorry

Explain TWO examples of IT usages in business (e.g.: application or system) that YOU
have used before. Discuss your experience of using these system or applications. The
discussions have to be from YOUR own experience

Answers

Answer:

(DO NOT copy from other sources). Discuss these systems or applications which include of:

Introduction and background of the application or system. Support with a diagram, screenshots or illustration.

Explanation:

Hi, I have a CodeHS Python assignment called "Exclamation Points"


the assignment is as follows and I have no idea where to start with this if someone could help me please:


"Words are way more edgy when you replace the letter i with an exclamation point!


Write the function exclamations that takes a string and then returns the same string with every lowercase i replaced with an exclamation point. Your function should:


Convert the initial string to a list

Use a for loop to go through your list element by element

Whenever you see a lowercase i, replace it with an exclamation point in the list

Return the stringified version of the list when your for loop is finished"

Answers

Using the knowledge in computational language in python it is possible write the function exclamations that takes a string and then returns the same string with every lowercase i replaced with an exclamation point.

Writting the code;

my_string = input("Enter text: ")

my_list = list(my_string)

for item in my_list:

   if item == "i":

       print "!"

       my_list.remove("i")

   print item

(" ").join(my_list)

my_string = list(input('Enter string: '))

for i, char in enumerate(my_string):

   if char == 'i':

       my_string[i] == '!'

print(''.join(my_string))

my_string = input("Enter text: ")

my_list = list(my_string)

for item in my_list:

   if item == "i":

       print "!"

       my_list.remove("i")

   else:

       print item

(" ").join(my_list)

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

#SPJ1

If you have a PC, identify some situations in which you can take advantage of its multitasking capabilities.

Answers

Situation one: using multiple monitors for tutorials on one screen and an application on another

Situation two: using virtual desktops for separating school and personal applications

Assume you are a manager in the security department of a high-tech corporation. You are mentoring Mary, an entry-level network technician, who is considering a career change to specialize in security. She asks you for advice as to whether she should self-study to become a security professional or seek formal education, such as a bachelor's degree in information security. What is your advice to Mary

Answers

Answer:

Seek a bachelor's degree.

Explanation:

Seems more compromised and education from people with experience already.

Mary, my advice to you would be to pursue formal education such as a bachelor's degree in information security, to specialize in the field.

Why should Mary consider pursuing a bachelor's degree in information security?

By obtaining a formal education in information security, such as a bachelor's degree, you will gain a comprehensive understanding of the fundamental principles, theories, and practices of security.

This will provide you with a solid foundation and knowledge base to excel in your career as a security professional. Additionally, pursuing a degree will often expose you to practical hands-on experiences, internships, and networking opportunities which will greatly enhance your learning and help you establish valuable connections within the industry.

Read more about security manager

brainly.com/question/32458782

#SPJ2

This type of network may not be connected to other networks.


A) LAN
B) MAN
C) WAN

Answers

Answer:

LAN

Explanation:

brainliest?:(

Answer:

A) LAN (Local Area Network)

A nested folder can best be described as what?
O a folder that is empty
a folder that contains more than one file
O a folder contained within another folder
O a folder that contains exactly one file

Answers

A folder contained within a folder

arrange the following numbers in ascending order -2/3, 7/-18 , 5/-19​

Answers

Answer:

2/3 5/19 7/18

Explanation:

What is wrong with the following code?
int name = "Steve":
if (name = "Steve") {
System.out.prſntln("Hi Steve!);
}

Answers

what language code are you using?

HELP WILL MARK BRAINLEST

Answers

Answer:

10 - true

11 - true

12 - analytic

13 - factory robots

Explanation:

:)

How did the case Cubby v. CompuServe affect hosted digital content and the contracts that surround it?

Answers

Although CompuServe did post libellous content on its forums, the court determined that CompuServe was just a distributor of the content and not its publisher. As a distributor, CompuServe could only be held accountable for defamation if it had actual knowledge of the content's offensive character.

What is CompuServe ?

As the first significant commercial online service provider and "the oldest of the Big Three information services," CompuServe was an American company. It dominated the industry in the 1980s and continued to exert significant impact into the mid-1990s.

CompuServe serves a crucial function as a member of the AOL Web Properties group by offering Internet connections to budget-conscious customers looking for both a dependable connection to the Internet and all the features and capabilities of an online service.

Thus,  CompuServe could only be held accountable for defamation if it had actual knowledge of the content's offensive character.

To learn more about CompuServe, follow the link;

https://brainly.com/question/12096912

#SPJ1

How to write a java program that asks the user for grades of students. Once the user enters 0 (zero), the program should print the largest of the marks of the students.

Answers

Answer:

import java.util.Scanner;

public class GradeProgram {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       System.out.println("Please enter the student grades: ");

       int grade = sc.nextInt();

       int largestGrade = 0;

       while (grade != 0) {

           if (grade > largestGrade) {

               largestGrade = grade;

           }

           grade = sc.nextInt();

       }

       System.out.println("The largest grade is: " + largestGrade);

   }

}

Explanation:

An automotive company tests the driving capabilities of its self driving car prototype. They Carry out the test on various types of roadways specifically a racetrack chill rack and dirt road what are the examples of fair or unfair practices

Answers

It is to be noted that testing a self-driving car prototype on various types of roadways, such as a racetrack, hill rack, and dirt road, can be considered fair practice. It would only be unfair practice if the lives and property of humans are put at risk during the testing.

What is unfair practice?

Unfair practices are behaviors that are neither just or fair. It would be deemed unjust to treat someone differently because of their color or gender, for example. Cheating or violating regulations to get an edge over others is also included. To develop a fair and just society, it is critical to constantly treat people with fairness and respect.

In this scenario, it is evident that endangering human life and property is unethical behavior.

Learn more about Unfair Practices:
https://brainly.com/question/14700715
#SPJ1

In this problem, you will derive the efficiency of a CSMA/CD-like multiple access protocol. In this protocol, time is slotted and all adapters are synchronized to the slots. Unlike slotted ALOHA, however, the length of a slot (in seconds) is much less than a frame time (the time to transmit a frame). Let S be the length of a slot. Suppose all frames are of constant length L = kRS, where R is the transmission rate of the channel and k is a large integer. Suppose there are N nodes, each with an infinite number of frames to send. We also assume that dprop < s,="" so="" that="" all="" nodes="" can="" detect="" a="" collision="" before="" the="" end="" of="" a="" slot="" time.="" the="" protocol="" is="" as="">

⢠If, for a given slot, no node has possession of the channel, all nodes contend for the channel; in particular, each node transmits in the slot with probability p. If exactly one node transmits in the slot, that node takes possession of the channel for the subsequent k â 1 slots and transmits its entire frame.

If some node has possession of the channel, all other nodes refrain from transmitting until the node that possesses the channel has finished transmitting its frame. Once this node has transmitted its frame, all nodes contend for the channel.

Note that the channel alternates between two states: the productive state, which lasts exactly k slots, and the nonproductive state, which lasts for a random number of slots. Clearly, the channel efficiency is the ratio of k/(k + x), where x is the expected number of consecutive unproductive slots

a. For fixed N and p, determine the efficiency of this protocol.
b. For fixed N, determine the p that maximizes the efficiency.
c. Using the p (which is a function of N) found in (b), determine the efficiency as N approaches infinity
d. Show that this efficiency approaches 1 as the frame length becomes large

Answers

Answer:

He is correct

Explanation:

In a network, servers receive requests from which of the following?
clients, which are the networked computers that request data.
O other networked computers, which use encrypted messages.
O ISPs, which control the type of data that can be sent on the network.
O routers, which direct the data to the correct destination.

Answers

Answer: routers, which direct the data to the correct destination.

Explanation:

In a network, servers receive requests from the routers, which direct the data to the correct destination.

The router simply refers to the networking device which helps in the forwarding of data packets between the computer networks. When a data packet is sent through one of the lines, then the information regarding the network address will be read by the router which will help it in determining the destination.

Answer:

A. clients, which are the networked computers that request data

100% right!

in a table from identify any three differences between data and information​

Answers

Answer:

Find the differentiation below.

Explanation:

The differences between data and information can be found below;

        Data                                                    Information

1. Data is an assembly of facts.         Information is a collection of facts but with                                                               meaning attached.                                                                                                                                                                                                                      

2. Data is unstructured.                     Information is structured.

3. Data is easily comprehended.      Information is easily comprehended  

                                                           because of its organized nature.                            

                                                           

The goal of this problem is to cover all roads with cameras. A camera placed at a station can cover all the roads connected to it. For example, if we place a camera at station 0, the roads (or edges) (0,3) and (0,8) are covered. Note: the edges (0,3) and (3,0) are the same. We want to find all solutions that can cover a network. For example, one solution is to place a camera at each station will cover all roads. In G2, which has 10 stations, this solution is the set {0,1,2,3,4,5,6,7,8,9} or [True, True, True, True, True, True, True True, True, True). Another solution for G2 is {2, 3, 5, 8} or [False, False, True, True, False, True, False, False, True, False, False]. Any road/edge in G2 is connected to one of these 2 or 3 or 5 or 8. Therefore, {2,3,5, 8} is one of the solutions we look for. The code below is almost complete in printing out all solutions, i.e. sets of stations that cover an entire network. What you need to do for this problem is modyfing the is_coverage function, which returns True if the solution is a coverage, and False if it is not. At this time, it's just a placeholder, which always returns True. This is obviously incorrect. You need to fix it. [42]: def is_coverage (solution, G): return True def get_stations(s): return set([i for i in range(len(s)) if s[i]==True]) def cover(G, solution, i): if i==len(solution): if is_coverage (solution, G): print(get_stations ( solution)) else: solution[i] = True cover(G, solution, i+1) solution[i] = False cover(G, solution, i+1)

Answers

Answer:

srry dont know

Explanation:

The largest form of a computer network is called
कम्प्युटर नेटवर्कको सबैभन्दा ठूलो रूप
aekar.xe.​

Answers

Answer:

Internet.

Explanation:

In computing, WWW simply means World Wide Web. The world wide web was invented by Sir Tim Berners-Lee in 1990 while working with the European Council for Nuclear Research (CERN); Web 2.0 evolved in 1999. Basically, WWW refers to a collection of web pages that are located on a huge network of interconnected computers (the Internet). Also, users from all over the world can access the world wide web by using an internet connection and a web browser such as Chrome, Firefox, Safari, Opera, etc.

In a nutshell, the World Wide Web is an information system that is generally made up of users and resources (documents) that are connected via hypertext links.

The largest form of a computer network is called internet because it comprises of several groups of computer that are interconnected.

Generally, the standard Internet communications protocols which allow digital computers to transfer (prepare and forward) data over long distances is the TCP/IP suite.

Here, we investigate what happens when we change the value of a variable in a function. Your instructions are to
define a function that takes a single argument, adds 10 to that argument, and then prints it out (all inside the function!)
then, outside of the function, print out x, call your function using x as its argument, and print out x again
In total, x should be printed out 3 times. Did you get what you expected?
Lab: Foreshadowing References
1 # define your function here Nm
2
3
4 x = 10 non
5
6 # print out the value of x
7
8 # call your function on x
9
10 # print out the value of x

Answers

Answer:

Observation:

The value of x remains the same in the main function

The value of x is incremented by 10 in the defined function

The program is as follows:

def Nm(x):

   x += 10

   print(x)

x = int(input("x: "))

print(x)

Nm(x)

print(x)

Explanation:

The explanation is as follows:

This defines the function

def Nm(x):

This increments x by 10

   x += 10

This prints x (the first print statement)

   print(x)

The main begins here; This gets input for x

x = int(input("x: "))

This prints x (the second print statement)

print(x)

This calls the function

Nm(x)

This prints x (the third print statement)

print(x)

Assume that x = 5;

The first print statement (in the function) prints 15 i.e. 5 + 10 = 15

The second and third print statements (in the main function) prints 5, the exact value of x

disk based recording systems are always (A) digital (B) analog (C) Both digital and analog

Answers

Answer:Disk based recording systems are always Digital.

Which company has the highest number of operating system versions on the market?

Linux

Microsoft

Apple

IBM

Answers

Microsoft has the highest number of operating system versions on the market, including Windows 11, Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows 2000, Windows NT, Windows ME, Windows 98, Windows 95, Windows 3.1, Windows 3.0, Windows 2.0, and Windows 1.0.

The correct answer is Microsoft

A table student consists of 5 rows and 7 columns. Later on 3 new attributes are added and 2 tuples are deleted. After some time 5 new students are added. What will be the degree and cardinality of the table?​

Answers

Answer:

The degree of a table refers to the number of attributes (columns) it has. In the case you described, after the 3 new attributes are added, the degree of the table would be 7 + 3 = 10.

The cardinality of a table refers to the number of rows (tuples) it has. In the case you described, after 2 tuples are deleted, the cardinality of the table would be 5 - 2 = 3. After 5 new students are added, the cardinality would increase to 3 + 5 = 8.

Pharming involves: setting up fake Wi-Fi access points that look as if they are legitimate public networks. redirecting users to a fraudulent website even when the user has typed in the correct address in the web browser. pretending to be a legitimate business's representative in order to garner information about a security system. using emails for threats or harassment. setting up fake website to ask users for confidential information.

Answers

Answer:

Explanation:

Pharming involves redirecting users to a fraudulent website even when the user has typed in the correct address in the web browser. An individual can accomplish this by changing the hosts file of the web address that the user is trying to access or by exploiting a DNS server error. Both of which will allow the individual to convince the victim that they are accessing the website that they were trying to access, but instead they have been redirected to a website that looks identical but is owned by the individual. The victim then enters their valuable and private information into the website and the individual can see it all and use it as they wish. Usually, this is done to steal banking information.

I need to create a python program with these guidelines can someone please help me.
It needs to be a list of numbers

Take inputs and add them to the list until there at 10 items.
- Prints the initial list and a count of the items in the initial list
- Sums all the items in the list and prints the sum.
- Multiplies all the items in the list and prints the product.
- Gets the largest number from the list.
- Gets the smallest number from the list.
- Removes the largest and smallest numbers from the list.
- Prints the final list and a count of the items in the final list.

Answers

l=[]

for x in range(10):

   l.append(float(input('Enter a number: ')))

print(str(l)+'\n'+'There at '+str(len(l))+' items in the list')

print('The sum of the elements in the list is: '+str(sum(l)))

t=1

for x in l:

   t*=x

print('The product of the elements in the list is: '+str(t))

print('The largest number in the list is: '+str(max(l)))

print('The smallest number in the list is: '+str(min(l)))

l.remove(max(l))

l.remove(min(l))

print(str(l)+'\n'+'There are '+str(len(l))+' items in the list')

I wrote my code in python 3.8. I hope this helps

Match each characteristic to its operating system.

[A] This system can be ported to more computer platforms than any of its counterparts.
[B] The operating system functions require many system resources.
[C] The operating system works only with specific hardware.

[1] Microsoft Windows Operating System
[2] Linux Operating System
[3] Apple Operating System

Answers

Answer:

[A] This system can be ported to more computer platforms than any of its counterparts. - [2] Linux Operating System

[B] The operating system functions require many system resources. - [1] Microsoft Windows Operating System

[C] The operating system works only with specific hardware. - [3] Apple Operating System

What benefit do internal networked e-mail systems provide over Internet-based systems?

A) They enable the transmission of videos.
B) They allow e-mail to be sent to coworkers.
C) They allow files to be shared by sending attachments.
D) They provide increased security.

Answers

Answer:

The correct answer is D) They provide increased security.

This image shows a web designer's grids for different pages on a website. The uppermost box on each page is the website's identity. Which important
feature of a good website has the designer violated?
A simplicity
B.
consistency
Ос
clarity
D. harmony

Answers

Answer: d

Explanation: hope this helps

Answer:

consistency

Explanation:

i got it right on plato

Hey tell me more about your service

Answers

Answer:

look below!

Explanation:

please add more context and I’ll be happy to answer!

write the program to accept the radius of circle and find its diameter coding

Answers

Um is there a picture for I can help because u forgot to put a picture:(

Design and implement a program that reads a series of 10 integers from the user and prints their average. Read each input value as a string, and then attempt to convert it to an integer using the Integer.parseInt method. If this process throws a NumberFormatException (meaning that the input is not a valid number), print an appropriate error message and prompt for the number again. Continue reading values until 10 invalid integers have been entered.

Answers

Answer:

Explanation:

The following program was written in Java. It creates a loop that asks the user for numbers. If it can convert it to an integer it accepts it and adds it to the sum variable otherwise it ouputs that it is not a valid number. Once all 10 integers are added it prints the Average of the values entered.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int count = 0;

       int sum = 0;

       while (count != 10) {

           System.out.println("Enter a number: ");

           String answer = in.nextLine();

           try {

               int intAnswer = Integer.parseInt(answer);

               sum += intAnswer;

               count += 1;

           } catch (NumberFormatException e) {

               System.out.println("Not a valid number.");

           }

       }

       int average = sum / count;

       System.out.println("Average: " + average);

   }

}

Other Questions
A boy wants a game which cost $180, but he only has 1/3 of the money, how much more money does he need to buy the game? There are a total of 32 books and calculators on a table. The ratio of the number of books to thenumber of calculators is 5: 3. How many calculators are on the table?A. 3B. 12C. 20D. 24 What is the coefficient of 5x in 5x 5x? What are the key traits of the Romantic era? An organism has the genotype AaBbCc. What is the probability of producing a gamete that only has dominant alleles for these three genes PLSSSSSSS HELPPPPP PLSSSS IM TIMEDDD ILYSM 40 POINTS!!!!! ( U CAN WRITE BOUT ANYTHING U WANT AND HAS TO BE 500 WORDS)You may come up with your OWN story idea or choose from the following options:1. Write about someone who does not fit well into his or her social circumstances.2. Write about two people who are attracted to one another but are prevented from uniting due to social norms or related personal conflicts.Your story must be organized and easy to follow. Pay attention to details.Focus on literary elements. These are the different parts that make up a story. Examples: setting, characterization, conflict, theme, tone, mood, point of view, imagery, etc. At 10:00 a.m. two planes leave an airport. if the northbound plane flies at 280 mph and the southbound at 320 mph, at what time will they be 1,000 miles apart? which equation can be used to solve for t, the time it takes the planes to be 1,000 miles apart? Can an intersex male get his female pregant with his sperm? ( like a non intersex male) Which of the following functions is controlled by the cell membrane?a. excreting wasteb. producing energyc. replicating DNAd. assembling proteins According to the last resort requirement, weshould try "everything" short of war first.True False What is zone of tolerance in service expectations? How does Beethoven manipulate sonata form in the piece 'Pathetique' from the expected structure, and why? A hotel is offering two weekend specials. The first special is 3 nights and 4 meals for $233. The secondspecial is 3 nights and 3 meals for $226.50.Part A: Write a system of equations to represent cost per night x and cost per meal y.Part B: What is the cost per night and the cost per meal? Which quantity is proportional to 12/4?Check all that are true.48/1836/1235/1524163/1 What are the 3 main lifestyle diseases? PLEASE HELP The numbers to choose from are 27, 333, 117, 207, 297, and 153. BARINLIST ANSWER ;)))) MARKING BRAINLIESTto which social dass did these women belong? what was the social class of their employer? if 6p = 120 what is p What is the degree measure of M? You need to study the satisfaction of customers of a specific restaurant. You decide to order food and talk to those customers sitting next to you. This would most closely describe which type of sampling technique