dentify the structure in which any function, including named functions, is nested within another function. insidefn() function outsidefn() { function insidefn() { commands } commands } function outsidefn() { commands function insidefn() { commands } commands } function outsidefn() { commands insidefn function () { commands } commands } outsidefn()function { commands function insidefn() { commands } commands }

Answers

Answer 1

Nested functions are defined inside of other functions. A nested function can see (access) all local objects (data, functions, types, etc.)  

A nested function, also known as a nested procedure or subroutine, is a function that is declared inside of another function known as the enclosing function in computer programming. A nested function can see (access) all local objects (data, functions, types, etc.) of both its immediately enclosing function and any function(s) that, in turn, enclose that function, but is itself invisible outside of its immediately enclosing function due to basic recursive scope rules. Although only a few levels are often utilized in actual systems, layering is theoretically conceivable to an infinite depth. Many early approaches to structured programming, including ALGOL, Simulate 67, and Pascal, as well as many contemporary dynamic languages and functional languages, use nested functions.

Learn more about Nested procedure here:

https://brainly.com/question/30029505

#SPJ4


Related Questions

The phase of installation when jacks are terminated is

Answers

Answer:termed as the termination phase. This is the stage when the individual wires or cables are physically connected to their corresponding jacks or outlets. This can include connecting wires to patch panels, modular connectors, or other types of terminations. This phase is a critical step in the installation process as it ensures that the connections are made correctly and that the network is properly configured for optimal performance.

11
Fourth part
nd return
Third part
except TooWide:
print("Your luggage will not fit in the overhead bln.")
21
class TooWide (Exception):
pass
11
try:
11
if width> 30:
else:
answer input('How wide is it?')
width= float(answer)
raise TooWide
Save and Exit
print("Have a nice tript")
Next

Answers

'How wide is it?' input height = float (answer) try: if width exceeds 30, raise TooWide If not, print "Have a good vacation!" excluding TooWide print("Your luggage will not fit in the overhead bin") ("Your luggage will not fit in the overhead bin.")

What is Computer programme?A series of instructions written in a programming language for a computer to follow constitutes a computer programme. Software, which also contains documentation and other intangible components, includes computer programmes as one of its constituents. The source code of a computer programme is what can be read by humans. A programme is a set of instructions that a computer can carry out. Programs are logical, well-organized, and written in a language that computers can understand.Computer programmes include MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, and others. In order to create graphics and special effects for movies, computer applications are used.

Except for Python, your application serves as an example to try.

A comparable except statement is what the Python interpreter anticipates when it encounters a try statement.

Thus, the full programme is:

class TooWide(Exception): pass

answer = input('How wide is it? ')

width = float(answer)

try:

    if width > 30:

          raise TooWide

    else:

          print("Have a nice trip!")

except TooWide:

    print("Your luggage will not fit in the overhead bin.")

To learn more about Computer programme, refer to:

https://brainly.com/question/27359435

#SPJ1

It appears that the text provided is a code snippet in Python programming language. Line 11 appears to be a loop of some sort, possibly a try-except block.

What these programming lines explains about?The loop is trying to check if the width of an object is greater than 30. If it is, it raises an exception called Too Wide.Line 21 defines the Too Wide exception as a class.Line 11 is again a try-except block, it tries to check the width of the object, if it's greater than 30 it raises the Too Wide exception, otherwise it prompts the user to input the width of the object and assigns it to the width variable.Line 11: The code saves and exits the program.Line 11: The code prints "Have a nice trip" as the final statement.

To learn more about python program refer:

brainly.com/question/26497128

#SPJ1

Which of the following statements about anti-malware are accurate? Select 2 options. (Multiple choice)

A) Anti-malware and firewalls perform the same functions.
B) It is rarely necessary to update virus definitions in anti-malware.
C) Anti-malware can detect viruses currently on your computer and within incoming files.
D) Anti-malware is software that identifies and removes malicious software
E) Anti-malware is 100 percent effective, but it is very expensive.

Answers

C) Anti-malware can detect viruses currently on your computer and within incoming files.

D) Anti-malware is software that identifies and removes malicious software

A user copies files from her desktop computer to a USB flash device and puts the device into her pocket. Which of the following security risks is most pressing?

Answers

confidentiality ensures that it is not shared with unauthorized parties. Because it is so simple to remove data from removable media and give it to unauthorized people, this poses a serious danger to confidentiality. Data availability ensures that it is accessible when required. transferring files to a malicious server.so, option (a) is the correct one.

The majority of sectors contain sensitive data that, if revealed, could cause serious harm to a company's reputation, loss of sales, legal expenses, punitive damage costs, and non-compliance fines. Protecting sensitive data on USB drives is a top priority, according to almost 80% of poll participants. By failing to appropriately monitor these devices and the data that is written to them, businesses expose themselves to data breaches and leaks.Although businesses are aware of the value of USB drives for productivity and efficiency, only 50% of them are needed to get authorization before using an external USB drive. The fact that these and other inadequate security measures will eventually make firms exposed to data compromise and assault may not come as a surprise.

To learn more about " USB drives" Click on below link

brainly.com/question/17109402#SPJ4

#SPJ4

A user copies files from her desktop computer to a USB flash device and puts the device into her pocket. Which of the following security risks is most pressing?

a) confidentiality

b) non-repudiation

c) intergrity

d) availbility

 

TRUE/FALSE. the ribbon in the microsoft office suite shows the same number of buttons no matter your monitor's display settings.

Answers

No matter how your monitor is set up for display, the ribbon in the Microsoft office suite always displays the same amount of buttons. which is incorrect.

Where is the ribbon display options button ?

To view the tabs and instructions if the ribbon is hidden, click the ribbon display options button on the title bar. Look at the tabs and click and drag on the pictures. You can get hints on where to find commands from tabs and groups, for example. They are sorted and gathered in one place.

At the top of the screen, the ribbon, which is a command bar, groups the functions of a software into a number of tabs. The purpose of ribbon tabs, which are made up of collections of related commands, is to make it simple for users to locate the commands they want. A bar (line) runs the length of each ribbon. In Microsoft Office 2007, the Ribbon, a user interface component, was unveiled by the company. It can be found below the Title Bar and Quick Access Toolbar.

To learn more about Ribbon refer to :

https://brainly.com/question/28904492

#SPJ4

please help me this question guys please​

Answers

Answer:

Part 3

1 - E

2 - C

3 - A

4 - B

5 - D

Part 4

1. 5 generations

2. size and weight

3. Vacuum Tubes

4. Fifth

5. Hybrid Computers

Explanation:

Compare the ufw status verbose command output with Windows Firewall with the Advanced Security Windows Firewall Properties you investigated in an earlier lab. Describe the major similarities that you observe.
Explain the advantages and disadvantages of having the firewall disabled at start up in the Linux operating system.
Create and document two firewall rules that you think would be important to include if all outbound traffic is being denied by the firewall rules. Explain your decision.

Answers

Firewalls can defend systems against the most common types of trojans, but they are unable to defend systems against other forms of malware, which may enter the system as trustworthy data.

What does a Linux firewall do?

A firewall is a network security system that regulates and filters traffic on the predetermined set of rules. It serves as a bridge between the device and the Internet. Linux's kernel includes the Netfilter component.

Does Linux require a firewall?

Most Linux desktop users don't need firewalls. You would only require a firewall if you were running a server application on your computer. It might be an email server or both.

To know more about Firewalls visit:-

https://brainly.com/question/13098598

#SPJ4

name your program calculator.java. it should work as follows: print out the list of operations for the user. prompt the user to enter an operation. this operation must be processed as case-insensitive.

Answers

Create a basic calculator class with methods for addition, subtraction, division, and multiplication.

To assist users in getting and setting the values on which an action is to be done, develop a getter setter class. main class, which is where the call to the operation is made. Calculations such as addition, subtraction, multiplication, division, modulus, power of numbers, etc. are performed using a Java calculator. A straightforward Java switch case and a Java swing standalone application can be used to perform this calculator operation. The widely used programming language BASIC is frequently implemented on desktop and handheld computers. Today, Casio BASIC or BasicLike and TI's own dialects of BASIC are the most often used languages in high-end calculators (TI-BASIC).

Learn more about operation here-

https://brainly.com/question/28335468

#SPJ4

A line in the plane can be specified in various ways: By giving a point (x,y) and a slope m (You DON'T NEED the Point Class) by giving two Points (x1,y1), (x2,y2) (You DON'T NEED the Point class.) as an equation in slope intercept form y = mx+b as an equation x=a if the line is vertical Implement a class Line with four constructors, corresponding to the four cases above. Implement methods: boolean intersects (Line other) boolean equals(Line other) boolean isParallel(Line other).

Answers

A line in the plane can be specified in various ways: Method 3: boolean is Parallel(Line other)  public boolean isParallel(Line other) {    return this.m == other.m;

What is the boolean ?

Boolean is a data type that represents one of two values, either true or false. It is commonly used in programming to determine the result of a comparison between two values. Boolean values are also used in logic to create logical expressions that can be used to control the flow of a program. Boolean values are the building blocks of any computer language and are essential for any programming task.

public class Line {

   

   // y = mx + b

   private double m;

   private double b;

   // x = a

   private double a;

   

   // Constructor 1: y = mx + b

   public Line(double m, double b) {

       this.m = m;

       this.b = b;

   }

   

   // Constructor 2: two points (x1,y1), (x2,y2)

   double x1, double y1, double x2, double y2 public Line

       if (x2 - x1 == 0) {

           this.a = x1;

       }

       else {

           x2 - x1 = (y2 - y1) / this.m;

           this.b = y1 - m * x1;

       }

   }

   

   // Constructor 3: equation in slope-intercept form y = mx + b

   public Line(String equation) {

       String[] parts = equation.split("x\\+");

       this.m = Double.parseDouble(parts[0].replace("y=", ""));

       this.b = Double.parseDouble(parts[1]);

   }

   

   // Constructor 4: equation x = a

   public Line(double a) {

       this.a = a;

   }

   

   // Method 1: boolean intersects (Line other)

   public boolean intersects(Line other) {

       if (this.a == 0 && other.a == 0) {

           return false;

       }

       else if (this.a != 0 && other.a != 0) {

           return false;

       }

       else {

           if (this.a != 0) {

               return this.a == other.b;

           }

           else {

               return other.a == this.b;

           }

       }

   }

   

   // Method 2: boolean equals(Line other)

   public boolean equals(Line other) {

       if (this.a == 0 && other.a == 0) {

           return this.m == other.m && this.b == other.b;

       }

       else {

           return this.a == other.a;

       }

   }

   

   // Method 3: boolean isParallel(Line other)

   public boolean isParallel(Line other) {

To learn more about boolean

https://brainly.com/question/26041371

#SPJ4

to paste a copied cell range, you only need to specify the upper right of the range where you want to paste it.

Answers

False, Use the Paste Special command to only paste the formats of a copied cell. in order to eradicate conditional formatting from a chosen range.

When you copy a set of cells and then paste them somewhere else What paste option is the default?

By default, everything from the source cell or range—including data, formatting, formulae, validation, and comments—is pasted to the destination cell when you copy (or cut) and paste in Excel (s).

What is the quickest way to copy and paste a set of cells or a range of cells?

The quickest method is to select the cell or cells you want to copy, then click the shortcut Ctrl + C. Choose the final cell (s).

To know more about command visit:-

https://brainly.com/question/3632568

#SPJ4

When a full tunnel is being used by a VPN client and server, you can expect the first hop in to always be the gateway for the network. 1) PuTTY; remote 2) tracert; remote 3) PuTTY; VPN 4) tracert; VPN Question 6 ( 1 point) Which tool or application can be used to create a remote connection with network devices, including switches, file servers, or web servers, across a LAN or WAN? 1) Ping 2) Traceroute 3) PutTy 4) Nslookup

Answers

You can expect the first hop in tracert to always be the gateway for the vpn network. PuTTY is  tool or application can be used to create a remote connection with network devices.

What is the difference between a server and a VPN?

Proxy servers and VPNs both mask your IP address, permitting you to visit websites anonymously, but VPNs are the only ones that route all network traffic through with an encrypted tunnel. Another significant distinction is that VPNs treat all network traffic, whereas proxy servers just address application-level data.

What is a server in a VPN?

A VPN server is a server of server that allows VPN services to be hosted and delivered. It is a combination between VPN software and hardware that connects VPN clients to a safe and/or local network, or perhaps the VPN.

To know more about vpn visit:-
brainly.com/question/29219067
#SPJ4

can i go into computer science with a degree in elecgtrical and computer engineering and machine learning

Answers

Computer engineering (CpE), a branch of engineering that combines computer science and electrical engineering, focuses on the study of computing systems, from tiny microprocessors to massive supercomputers. Electrical engineers that focus on hardware design, software design, or both are known as computer engineers.

What Is computer engineering a combination of electrical engineering and computer science?The School of Electrical Engineering and Computer Science oversees the Electrical Engineering program (EECS). The School is the recipient of a sizable endowment from the late Dr. C. Paul Stocker, a graduate of electrical engineering. Few other electrical engineering and computer science institutions in the country can match the degree of expertise and support provided by this gift for facilities.Two curriculum options for the B.S.E.E. program in electrical engineering are available. For students who want to pursue a career in one of the numerous fields of electrical engineering, there is the electrical engineering (EE) track. If a student wants to work in the computer industry, they can choose the computer engineering (CpE) track. Follow the electrical engineering track while deciding which field you want to study if you're still unsure.

To Learn more About  Computer engineering refer TO:

https://brainly.com/question/24181398

#SPJ4

in this exercise we will write code to rotate the cube. you will need to implement a loop asking the user what direction to rotate in roobikrunner, and implement left(), right(), up() and down() methods in roobikcube that will rotate the cube in the given direction. for example, if the cube looks like: w b o g y r and you rotated left, the cube would now look like: w o g r y b so, to recap: roobikrunner.java - add a command loop that asks the user for which direction to turn the cube, including the option to exit the program. after each turn is executed, print out the cube. roobikcube.java - copy your code from the previous assignment. implement the 4 commands as void methods - left(), right(), up(), down() roobikface.java - still nothing to do on this one. yet. this activity is worth 10 points.

Answers

There are three sets of opposite faces in a cube, which has six faces overall. Two possible 90° rotations, one in one direction and the other, are feasible for a spindle that passes through the centers of two opposed sides. Thus, there are six 90° rotations.

How do you rotate a cube?A cube's symmetry is a permutation of its eight corners that connects edges to edges; in other words, if a pair of corners are connected by an edge, then every symmetry must transmit that pair to another pair of corners that are similarly connected by an edge. There are 48 symmetries in a cube, 24 of which can be realized physically on a solid cube, while the remaining 24 effectively flip the cube inside out. A cube contains six sides, any of which can be moved to the bottom and then rotated into one of four places. This property explains why there are 24 physical symmetries: 6 × 4 = 24.The answer to this question is provided on page 8 of my book Symmetry and the Monster. Several readers have inquired as to whether it is possible to rotate to each of the 24 places in a single turn. Yes, as shown above, and this is how it functions.The cube must always occupy the same space before and after each rotation, which is the first thing to comprehend. As a result, we are unable to determine whether a rotation has taken place without identifying the cube's faces from one another by colors, numbers, or other markings.

To Learn more About cube, refer TO:

https://brainly.com/question/19891526

#SPJ4

unlike application software programs, which run in a window on your desktop,____usually run in the background whenever they're needed.

Answers

System software programs  usually run in the background whenever they're needed.

What is programs?

Programs are sets of instructions that tell a computer how to perform a task. Programs can be written in a variety of computer languages, including C++, Java, Python, Visual Basic, and HTML. A program consists of one or more files that contain code, which tells the computer what to do when a certain command is issued. The code is written in a way that is understandable by the computer and can be read and understood by a human. Programs can range from simple games to complex applications that manage businesses.

System software forms the platform for application software programs to work on, allowing a user to access the hardware and other resources of the computer. This type of software includes the operating system, device drivers, language translators and utilities.

To learn more about programs
https://brainly.com/question/1538272
#SPJ4

A An attacker is planning to set up a backdoor that will infect a set of specific computers at an organization, to inflict a set of other intrusion attacks remotely. Which of the following will support the attackers! plan? (Select all that apply.) A. Crypto Malware B. Computer Bots C. Skimming Confirm D. Command & Control

Answers

The attackers' strategy to install a backdoor that will infect a set of certain computers at an organization in order to remotely launch a number of other intrusion attempts will be supported by computer bots and command and control.

What is the main task carried out by crypto malware?

It encrypts all or portion of the computer's files and asks the victim to pay a ransom in exchange for the decryption key. Recenter variants can also infect shared, networked, and cloud storage.

What are the most typical malware attack techniques?

Phishing emails are by far the most popular way for hackers and state-sponsored hacking groups to transmit malware. Hackers have gotten quite good at creating emails that persuade recipients to click on links or download files containing harmful software.

To know more about computer bots visit:-

https://brainly.com/question/28540266

#SPJ4

In the DMAIC (Define, Measure, Analyze, Improve, Control) process improvement, which of the following would belong to the measure step?Map and analyze current process

Answers

The "Map and analyze current process" activity would belong to the "Measure" step of the DMAIC (Define, Measure, Analyze, Improve, Control) process improvement method. The measure step is focused on identifying and quantifying the current performance of the process, including collecting data and measuring key performance indicators (KPIs) to establish a baseline for the process. Mapping and analyzing the current process helps to identify bottlenecks, inefficiencies, and other issues that may be impacting the process's performance. This information is then used to determine where improvements can be made and establish measurable goals for the process.

which of the following is true of symbols and communication?

Answers

A symbol is a representation of an idea, object, or concept that conveys meaning and serves as a form of communication. Symbols can be verbal, visual, or abstract and have the power to create a shared understanding among people.

What is symbol?

A symbol is a physical object, character or sign that stands for or represents an idea, concept, or object. Symbols are often used to represent different meanings, emotions, or ideas. Examples of symbols include words, numbers, shapes, colors, and images. Symbols can be used in literature, artwork, and language to convey a specific message or to evoke a certain emotion. Symbols are often used to signify something larger than what is represented, such as a nation, a religion, an ideology, or even a set of values. Symbols can also be used to represent a certain idea, such as a flag representing a country or a cross representing Christianity. Symbols can also be used to represent abstract concepts, such as light representing hope or a dove representing peace.

To learn more about symbol
https://brainly.com/question/30169917
#SPJ4

I am terrible at writing essays… Please help me!! Please make sure it’s not the automated response that it gives either please.

Answers

Answer:

i am also very terrible at essays, but try checking out chatGPT. it can help

Explanation:

Which of the following allows for verifying the absence of traffic on a shared transmission medium in 802.3 networks?
a. CDMA (Code-Division Multiple Access)
b. CSMA/CA (Carrier Sense Multiple Access w/ Collision Avoidance)
c. CWDM (Coarse Wavelength Division Multiplexing)
d. CSMA/CD (Carrier Sense Multiple Access/Collision Detection)

Answers

d. CSMA/CD (Carrier Sense Multiple Access/Collision Detection)

79.1% complete question an attacker used an exploit to steal information from a mobile device, which allowed the attacker to circumvent the authentication process. which of the following attacks was used to exploit the mobile device?

Answers

The attack used could be a variety of attacks, such as a phishing attack, or an exploit that takes advantage of a vulnerability in the mobile device's operating system in authentication process.

What is authentication process?

Authentication is the process of verifying the identity of a user or device. It is used to ensure that the person or device attempting to access a system is legitimate. Authentication is typically done through a username and password combination, but can also include biometric data such as fingerprints, retinal scans, or facial recognition. Authentication can also be done through two-factor authentication, which adds an additional layer of security by requiring a second form of identity verification such as a security code sent via text message. Authentication is essential for protecting sensitive data and maintaining system security.

To learn more about authentication process

https://brainly.com/question/13615355

#SPJ4

Zoned bit recording is how disk manufacturers ensure that a platter’s outer tracks store as much data as possible. True or False?

Answers

Disk manufacturers use zoned bit recording to make sure that the outside tracks of a platter can hold the most data possible. False

Which statement about the majority of drive imaging tools is accurate?

They fulfill the same role as a backup. They make sure the digital evidence is not harmed by a corrupt original drive.

What program is employed for disk forensic imaging?

Autopsy.The Sleuth Kit disk analysis

The most well-known forensics toolkits on the market are probably Autopsy and the Sleuth Kit. A command-line tool called The Sleuth Kit conducts forensic examination of hard drive and smartphone forensic photos.

To know more about  platter’s outer tracks visit:-

https://brainly.com/question/27110897

#SPJ4

if you wanted a custom dimension that reports membership status for a customer rewards program, which of these scopes would be set? Session
Event
Product
User

Answers

The custom dimension known as USER Scope reports the status of a customer rewards program's membership.

Due to the ability to group all of a user's component sessions and hits by a single value through the usage of user-level scope, USER Scope is the custom dimension that reports the status of a customer rewards program's membership. For a particular use, it is perfect for values that do not change regularly. Finally, think about how a game developer may use user-level custom dimensions to compare the number of levels played by trial users and paying customers. Screen views, like in the prior instances, are already used to keep track of how many times each level has been played overall, but the developer now wants to divide screen views by free and paid users.

Learn more about USER Scope here:

https://brainly.com/question/29376396

#SPJ4

which of the following statements describes the difference in how local variables and instance variables work given the following code fragment? def main():
p = Object1(2, 3)
print(p.method1())
print(p.method2())
print("done")

Answers

The instance variables are reused each time an Object1 method (like method1() or method2()) is called, while new copies of the local variables are only utilised each time.

A variable in programming is a value that can vary based on external factors or data that has been supplied to the programme. A programme typically comprises of data that it uses while running and instructions that tell the machine what to execute. Constants, or fixed values, are values that never change, while variables are values that can change but are often set to "0" or another default value since a program's user will supply the real values. Constants and variables are often classified as certain data types. Each data type specifies and restricts the data's shape. An integer expressed as a decimal number is an example of a data type, as is a string of text characters that is often constrained in length.

Learn more about Variable here:

https://brainly.com/question/13375207

#SPJ4

from the following tcp communication flags identity the flag which initiates a connection between different hosts.

Answers

From the given TCP communication flags, the flag which initiates a connection between different hosts is the SYN flag.

What is SYN flag?

The SYN flag is a control flag used in the Transmission Control Protocol (TCP) to initiate a connection between two computers. When the SYN flag is set, the first computer sends a SYN packet to the second computer, which responds with an acknowledgment (ACK) packet.

This exchange of SYN and ACK packets between two computers is known as the TCP three-way handshake. After this three-way handshake is completed, a connection is established and the two computers can begin sending data back and forth. The SYN flag is used for other purposes as well, such as for retransmission of lost packets and to close a TCP connection.

To learn more about SYN flag

brainly.com/question/14377589

#SPJ4

briefly describe architecture of IOT?​

Answers

Explanation:

IOT architecture consists of the devices, network structure, and cloud technology that allows IOT devices to communicate with each other. A basic IOT architecture consists of three layers: Perception (the sensors, gadgets, and other devices) Network (the connectivity between devices)

the syntax of which of the following formulas would allow the analyst to count purchase sizes of two or more?a. =SUMIF(G2:G30,"<=")b. =COUNTIF(G2:G30,">=")c. =SUMIF(H2:H30,"=4")d. =COUNTIF(H2:H30,">=")

Answers

The following formulas would allow the analyst to count purchase sizes of two or more;d. =COUNTIF(H2:H30,">=")

What is the analyst ?

An analyst is a professional who performs analysis of a situation or problem in order to provide solutions, guidance, and recommendations. Analysts are often employed in business, finance, and scientific research. They use a variety of methods to evaluate data and make decisions. These methods include data analysis, statistical analysis, and qualitative analysis. Analysts may also be involved in presenting their findings to stakeholders and helping to develop strategies for implementation. Analysts must be organized and have strong problem-solving and communication skills. They must also be able to think analytically and be able to make decisions based on the evidence they have gathered.

To learn more about analyst

https://brainly.com/question/30100872

#SPJ4

tiff, png, and gif files can be compressed using ___compression, so the files contain all of their original data when uncompressed.

Answers

Tiff, png, & gif files can indeed be compressed via lossless compression, thus when decompress, the files retain all of original original data.

What do you mean by lossless compression?

Lossless compression is a sort of data compression technology that allows for flawless reconstruction of original data from compressed data. Lossless compression methods can be reversed. Because the file data is restored in its original form after decompression, lossless compression allows the image to just be compressed without affecting image quality. Because no data is lost during the process, it is commonly referred to it as reversible compression. ZIP and RAR are two popular lossless formats for file compression. GZIP compression is commonly used online to minimise the size of JavaScript & CSS files. The PNG image compression format is well-known.

To know more about lossless compression, visit

brainly.com/question/17266589

#SPJ4

#include
#include
using namespace std;
/*
Write a for loop to print all NUM_VALS elements of vector courseGrades, following each with a space (including the last). Print forwards, then backwards. End with 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 = NUM_VALS - 1.
Note: These activities may test code with different test values. This activity will perform two tests, the first with a 4-element vector (vector courseGrades(4)), the second with a 2-element vector (vector courseGrades(2)). See How to Use zyBooks.
Also note: If the submitted code tries to access an invalid vector element, such as courseGrades.at(9) for a 4-element vector, 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.
*/
int main() {
const int NUM_VALS = 4;
vector courseGrades(NUM_VALS);
int i = 0;
courseGrades.at(0) = 7;
courseGrades.at(1) = 9;
courseGrades.at(2) = 11;
courseGrades.at(3) = 10;
/* Your solution goes here */
int loopLimiter = courseGrades.size() - 1; //NOTE: size() starts at 1 NOT 0 for(i = 0; i <= loopLimiter; i++){
cout << courseGrades.at(i) << " ";
}
cout << endl;
for(i = loopLimiter; i >= 0; i--){
cout << courseGrades.at(i) << " ";
}
cout << endl;
return 0;
}

Answers

The loop to print all NUM_VALS elements of vector courseGrades can be write as follows:

#include <iostream>

#include <vector>

using namespace std;

int main() {

  const int NUM_VALS = 4;

  vector<int> courseGrades(NUM_VALS);

  int i = 0;

  courseGrades.at(0) = 7;

  courseGrades.at(1) = 9;

  courseGrades.at(2) = 11;

  courseGrades.at(3) = 10;

  /* Your solution goes here  */

int loopLimiter = courseGrades.size() - 1; //NOTE: size() starts at 1 NOT 0                                                    

for(i = 0; i <= loopLimiter; i++){

 cout << courseGrades.at(i) << " ";

}

cout << endl;

for(i = loopLimiter; i >= 0; i--){

 cout << courseGrades.at(i) << " ";

}

cout << endl;

  return 0;

}

Code may be tested using various test values throughout these operations. Using a 4-element vector (vectorint> courseGrades(4)) for the first exam and a 2-element vector (vectorint> courseGrades(2)) for the second, this activity will conduct two tests.

Learn more about code at brainly.com/question/17293834?

#SPJ4

Suppose users share a 10 Mbps link. Also suppose each user requires 200 kbps when transmitting, but each user transmits only 10 percent of the time. (See the discussion of packet switching versus circuit switching in Section 1.3.)a. When circuit switching is used, how many users can be supported?b. For the remainder of this problem, suppose packet switching is used. Find the probability that a given user is transmitting.this problem, we consider sending real-time voice from Host A to Host Bc. Suppose there are 120 users. Find the probability that at any given time, exactly n users are transmitting simultaneously. (Hint: Use the binomial distribution.)

Answers

The probability of there being 21 or more users is 0.001, as there are only 20 users who have the ability to transmit.

How do you find the probability that a given user is transmitting?

We'll refer to this probability as p and it equals the fraction of time, or 0.2, that a given (specific) user is sending. The probability that any other Nps-1 users are not transmitting is equal to the probability that one specific other Nps-1 user is not busy, which is (1-p). 100 Kbps must be set aside for each user at all times when using circuit-switching. Therefore, only ten users can be connected to the link at once. There is a less than.0004 chance that there will be 10 or more concurrently active users using packet switching if there are 35 users.

[tex]$$\begin{aligned}& 10 \mathrm{Mbps} / 200 \mathrm{Kbps}=10 \\& 10 \%=1 / 10=0.1 \\& 120 \mathrm{Cn}(1 / 10)^\mathrm{n}[(9 / 10)]^{(120-n)}\end{aligned}$$[/tex]

Since there are only 20 users who can transmit, the likelihood of there being 21 or more users is 0.001.

To learn more about Probability refer to :

https://brainly.com/question/30141138

#SPJ4

How to fix this eror: you are running `create-react-app` 4.0.3, which is behind the latest release (5.0.1). we no longer support global installation of create react app. please remove any global installs with one of the following commands: - npm uninstall -g create-react-app - yarn global remove create-react-app

Answers

Try running npx create-react-app your-app after using npx clear-npx-cache to remove your npx cache. It aids in correcting the error.

How can I remove the Create React App version 4.0 3?

To remove any global versions of create-react-app, use npm uninstall -g. Update npm by running npm I -g npm latest. Try to clear any cached information about create-react-app by running sudo npm cache clean -f followed by npm uninstall -g create-react-app.

Why does it take so long to construct a React app?

There are only a few variables that could affect how well npm or npx commands function in general. Hard disks (often 5400RPM models) are the bottleneck for I/O performance, which slows down the installation process. challenges with internet access, such as slow or high latency.

To know more about error visit:-

https://brainly.com/question/17101515

#SPJ4

Other Questions
Which of the following ways is not something you can do to protect yourself against sending payments to the wrong person when using a p2p payment app or service The carbn dioxide is matter that is made up of What element in the mythology of the Egyptian judgment of the dead depicts the importance of the concept of balance?. PLEASE HELP ME I NEED TO TURN THIS IN BY TMMR!! What is momentum known for?. Symone sold shares of Naraghi Corporation stock to Aleena. The stock is listed on the NYSE. This trade occurred in which one of the following?answer choicesO Primary, dealer marketO Secondary, dealer marketO Primary, auction marketO Secondary, auction marketO Secondary, OTC market a student launches the python interpreter from his home directory. his home directory contains another directory called 'mydir', and 'mydir' contains two files called 'foo' and 'bar'. the home directory does not contain any files, only other directories. what will happen when he writes the following code at the python prompt: Which graph shows the solution to this inequality? 153x+6 What is the value of a in the following image? One of the variables required for theexperiment is volume of gas thecontainer can hold.A sealed container held 62.8 mL ofwater. What is the volume of thecontainer in liters? What is classified as hazardous waste in automotive?. What would happen if the axis of the earth were NOT tilted with reference to the plane of its revolution as shown in the second figure below?a)) There would be no difference at all.b) The sun would rise in the west and set in the east.c) In any place, the weather will be more uniform throughout the year.d) At any time, the weather will be almost the same throughout the world. Per company charge $20 per day to rent a car and $. 10 for every mile driven. Addion want to rent a car knowing that he plan to drive 100 mile and he ha at mot $80 to pend right and olve an inequality which can be ued to determine X the number of day Addion can afford to rent or tay within her budget Which of the following has an answer that is a whole number?1. v202. v153. v25 In which of the following ways are copyrights different from trademarks?O It is not necessary to do anything to obtain a trademark, but a copyright must be approved.O It is not necessary to do anything to obtain a copyright, but a trademark must be approved.O Trademarked materials can be used under fair use laws, while copyrighted materials cannot.OCopyrighted materials can be used under fair use laws, while trademarked materials cannot. Will mrak brainliest!!!Which sentence from the excerpt most strongly supports the inference you can make about the author's point of view?A)Shes simply called HeLa, the code name given to the worlds first immortal human cellsher cells, cut from her cervix just months before she died.B)Ive spent years staring at that photo, wondering what kind of life she led, what happened to her children, and what shed think about cells from her cervix living on foreverbought, sold, packaged, and shipped by the trillions to laboratories around the world.C)One scientist estimates that if you could pile all HeLa cells ever grown onto a scale, theyd weigh more than 50 million metric tonsan inconceivable number, given that an individual cell weighs almost nothing.D)All of the stories mentioned that scientists had begun doing research on Henriettas children, but the Lackses didnt seem to know what that research was for. What are Compound and Compound-Complex Sentences? What is repetition in literature called?. Tristan has a points card for a movie theater.He receives 25 rewards points just for signing up.He earns 8.5 points for each visit to the movie theater.He needs at least 110 points for a free movie ticket.Write and solve an inequality which can be used to determine vv, the number of visits Tristan can make to earn his first free movie ticket. according to auguste comte, what is the job of the sociologist?