Unit 6: Lesson 2 - Coding Activity 1 AP Computer science

Answers

Answer 1

The complete program is to define a boolean method that returns true if all elements of an array are negative, or return false, if otherwise

The method in java, where comments are used to explain each line is as follows:

//This defines the method

public static boolean chkNegative (double[] myArr) {

   //This initializes a boolean variable

   boolean isNeg = true;

   //This iterates through the array

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

     //If the array element is 0 or positive

     if (myArr[i] >= 0) {

         //Then the boolean variable is set to false

       isNeg = false;

       //And the loop is exited

       break;

     }

   }

   //This returns true or false

   return isNeg;

 }

Read more about boolean methods at:

https://brainly.com/question/18318709


Related Questions

Ethan is afraid that his poor grades will get him kicked out of his university at the end of the semester. He decided to remotely access the dean's computer and change his grades in the school system. If caught, Ethan will have to confess to committing what?

A.
virtual education

B.
grade hacking

C.
a computer crime

D.
educational fraud

Answers

Answer:

Computer Crime

Explanation:

You're evading someones privacy and gaining access to their computer or device without consent. Therefore, it is a computer crime.

Answer:

Educational fraud

Explanation:

Ethan changed his grades in the school system claiming to have better grades then he really does.

A means of giving credit to a source when their information is used.
Question 15 options:

Citation

Wi-Fi

Asynchronous Communication

Malware

Answers

It is a citation for the answer

What is my mistake in this case?

Answers

Answer:

I think it suppose to be #print out house

Answer:

i guess take the hint, bro.

Explanation:

Levi wants to run 5 commands sequentially, but does not want to create a shell script. He knows that each command is going to take approximately 20 minutes to run individually. However, he would like to go to lunch 15 minutes from now. He knows that he can type all of the commands on the same line and separate them with a certain character to run them sequentially.

Required:
Which character can he type after each command to have them run one after the next without requiring further input from him?

Answers

Answer:

um

Explanation:

what subject is this again?

what is syllabus of diploma in computer after class 10​

Answers

Answer:

[tex] \: [/tex]

List Of Best Computer Courses After 10th :

Certificate Program In MS OfficeBasic Computer CourseWeb Designing CourseDigital Marketing CourseData Entry CourseGraphic Designing CourseWeb Development CourseAnimation And VFX CourseComputer Science Diploma/EngineeringDiploma In Financial Accounting

Which of the following statements best explains how multitasking works in the human mind?

Answers

Multitasking is a myth—everyone can only process information one piece at a time.

Answer: He's right

Explanation: I got the answer too

Tynker has a particular layout, with the blocks on the left, editor in the middle, and output on the right. Which word best describes this screen layout?
block-based
interface
editor
player

Answers

Interface best describes the layout of the screen.  This is done by designers

in which they help to design the appearance and style of various software

and devices.

These characteristics help to ensure the users find them friendly and easy to

navigate through when performing various operations .

In this scenario, we were told that the layout has blocks on the left, editor in

the middle, and output on the right which are designs for easy navigation on

Tynker.

Read more about Interface here https://brainly.com/question/5080206

Answer:

interface

Explanation:

You can use the ____ method to search a string to determine whether it contains a specific sequence of characters.

Answers

Answer:

in

Explanation:

Not an explanation, but here's an example:

if "mouth" in "mouthwatering":

   print("It is.")

else:

   pass

Another example:

if "water" in "mouthwatering":

   print("Yes.")

else:

   pass


What is the missing line of code?
22
>>> books = {294: 'War and Peace', 931:'Heidi', 731:'Flicka'}
>>>
dict_keys([294, 931, 731])
O books allo
O books.values()
O books
O books.keys()

Answers

Answer:

books.keys()

Explanation:

I ran the code and the awncers though python and books.keys() is the one that came up with the awncer

books.keys() is the missing line of code with respect to the books with the help of Python language.  Thus, option D is correct.

What is a code?

In a certain programming language, a collection of commands or a collection of rules are referred to as computer code. It's also the name given to the source code just after the translator has prepared it for computer execution.

Code is a developing company that focuses on producing aesthetically pleasing, code-correct internet, application forms, and phone application.

The correct code will be according to the Python language will be in addition to books.keys():

books.keys()

books = {294: 'War and Peace', 931:'Heidi', 731:'Flicka'}

books.keys()

dict_keys([294, 931, 731])

Therefore, option D (books.keys()) is the correct option.

Learn more about code, here:

https://brainly.com/question/17204194

#SPJ2

how many pages is 1500 words double spaced 12pt font?

Answers

Answer:

6 pages

Explanation:

is there actually a difference between left and right twix

Answers

one has more caramel and one has more cookie

What are some of the restrictions to muscle wire?

Answers

Answer:

Muscle Wire is an extremely thin wire made from Nitinol (a nickel-titanium alloy) that is known for its ability to contract when an electric current is applied.Although thin and lightweight, one of the most amazing things about Muscle Wire is that they can lift many times their weight and are able to do 100 times more work per cycle than the human muscle. This material is easy to use, small in size, operates silently, has a high strength-to-weight ratio, and is easily activated using AC or DC power. This technology is ideal where mechanics require minimization, such as electronic textiles projects, robotics or nano-applications.Muscle Wire is an extremely thin wire made from Nitinol (a nickel-titanium alloy) that is known for its ability to contract when an electric current is applied.

Please help please help

Answers

Answer:

Bonjour,

Vraiment superbe idée, mais (eh eh, désolé) pour la version en ligne cela ne marche pas avec Brunoy par exemple en gare d’arrivée (j’ai même l’impression que ce n’est que pour les grandes lignes, pas pour notre pôvre petit RED D) et avec un peu moins de surprise, seule l’année 2014 peut être choisie.

Je profite donc de ce billet pour économiser 0.34€/min si vous pouvez avoir l’information de la durée de rétention des objets trouvés…

Merci

Bien cordialement

Az

ExplanationBonjour,

Vraiment superbe idée, mais (eh eh, désolé) pour la version en ligne cela ne marche pas avec Brunoy par exemple en gare d’arrivée (j’ai même l’impression que ce n’est que pour les grandes lignes, pas pour notre pôvre petit RED D) et avec un peu moins de surprise, seule l’année 2014 peut être choisie.

Je profite donc de ce billet pour économiser 0.34€/min si vous pouvez avoir l’information de la durée de rétention des objets trouvés…

Merci

Bien cordialement

Az:

A student is writing a research paper on astronomy. His teacher has asked that she include a visual aid to explain the scientific concepts in her paper. She has chosen to write about the moon, and she wants to use a visual aid to show what the surface of the moon looks like.

Which visual aid would best support her topic?

Answers

Answer: a map showing the different sizes of the moon's craters

Explanation:

the reason for this is because the student wants to show what the surface of the moon looks like.

WHEN IS THE DESIGN PROCESS FINISHED IN ENGINEERING?​

Answers

Answer:

I think answers is it never ends

what is a saved link to a particular web page?​

Answers

Answer:

A bookmark

Explanation:

A bookmark is a saved link to a particular Web page. Microsoft Internet Explorer denotes bookmarks as “favourites.” Boolean operators Most search engines (e.g. Go.ogle) allow you to limit your search or make it more specific by using words such as “and”, “or” and “not”.

! (( i > ( f + 1)) es verdadero o falso segun la logica de programación.

Answers

Answer:

yeajadaj

Explanation:

This type of RAID implementation uses its own Central Processing Unit (CPU) for calculations on an intelligent controller card by:

Answers

RAID implementation uses its CPU for calculations on an intelligent controller card by a hardware implementation.

Basically, a hardware implementation refers to a job is done using a physical device or electronic circuit rather than been done automatically by the computer program.

Hence, through a hardware implementation, the RAID implementation is able to use its CPU for calculations on an intelligent controller card

Read more about hardware implementation

brainly.com/question/25803633

Can you help me to write a code with functions,arrays,and pointers in c++?
It can be a basic game or an interesting program.
But a little bit complicated :)
Please I need help :(((​​

Answers

Answer:

Your search for complete and error-free projects in C and C++ ends here! Here, we’ve enlisted all the mini-projects, projects, games, software and applications built using C and C++ programming language — these are the projects published in our site or available with us at the moment. You can download all these projects (with source code) for free; make sure to check their individual post description as well.

First thing, most students learn C and C++ as their first programming language. They quickly become able to write programs that include functions, arrays and pointers, file handling and data structure, etc. But, when it comes to building a mini-game, an application, or a small project, incorporating all these features in one compact program becomes difficult.

In such case, reference projects always come in handy. The C and C++ projects published in our site will teach you how to get started, give you ideas and topics regarding your project, and sharpen your programming skills in C and C++. Here, you’ll find short and simple as well as long and complicated projects.

A healthcare crisis where millions of patient medication records were tampered with is an example of what type of breach?

A.
integrity breachc.

B.
codependency breach

C.
authentication breach

D.
AIC Triad breach

Answers

A healthcare crisis where millions of patient medication records were tampered with is an example of; A: Integrity Breach.

To answer this question, let us access each of the options;

A) Integrity breach; This is a breach that occurs when where there is an unauthorised or accidental alteration of the personal data of individuals or a group.

B) Codependency breach; This is not really a breach in this context as it happens when there is an imbalanced relationship between two or more people.

C) Authentication breach; This is a type of breach that is more common with a breach of passwords and login details.

D) AIC Triad breach; AIC is Availability, Integrity and confidentiality. So it combines Availabilty breach, integrity breach and confidentiality breach.

In this question, the patient medication records were tampered with which means that they were altered and from our definitions above, this is an example of integrity breach.

Read more about security breach at; https://brainly.com/question/15957125

Help please

What is an ordered pair?

1. a type of font in Microsoft Word

2. the end of the x-axis on a coordinate grid

3. two numbers that tell the location of a point on a coordinate grid

4. a type of table located in the Table drop-down menu

Answers

Answer:

two numbers that tell the location of a point on a coordinate grid

Explanation:

Answer:

Two numbers that tell the location of a point on a coordinate grid.

Explanation:

An ordered pair would look like this

(0, 4) or (7, 2)

the first number would be on the x-axis and then the second would be on the y-axis

Shadow and highlight create depth (3D).
TRUE OR FALSE

Answers

Answer:

true because then it would be like not popping out

please answer ASAP!!!!!!

Answers

Answer:

the first constructor invocation will work.

pet temp("mouse", 5.99);

Explanation:

This will create a pet object on the stack, using the constructor.

If you want to create an object on the heap, you would use the new operator:

pet* pTemp = new pet("mouse", 5.99);

Can someone help me with this please

Answers

Answer:

D

Explanation:

Filters and the Sort feature can be applied in any order. 

many phone fraud scammers are expessily cunning because they approach the target to try to sell

Answers

Answer:

improved computer security programs

Explanation:

Answer:

Improved computer security programs.

Explanation:

Just took the quiz

What type of information is appropriate for headers and footers? Check all that apply.

Answers

Answer:

C,  E,F,G  are correct

Explanation:

Answer:

C,E,F,G  are correct.

Explanation:

Software that is used to detect and eliminate computer viruses. Question 3 options: Wi-Fi Cable Internet Antivirus Application Browser

Answers

Answer:

Anti Virus

Explanation:

Antiviruses (Windows Defender, McAfee, Avast) scan your computer/device for viruses.

Physical components of a computer system such as a keyboard, mouse, or modem.

Question 25 options:


Software


Network


Browser


Hardware

Answers

Answer:

D

Explanation:

D: Hardware. These are the things like mouse or Modem that you can touch physically.

Software is what the computer runs to make itself useful.

Network is the connection (either virtual or physical) that connects computers together.

Browser is a software program used to navigate the internet

Can someone help me please and please answer all the questions and explain :D

Answers

Answer:

1. is A. 2. is C.  3. is A.

Explanation:

Filters remove all data that does not match the requirements.

I'm confused as to if subclasses can call the supers without any implementation and what the right answer is

Answers

Answer:

E

Explanation:

Since Example1 and Example2 inherit from Example0, all classes have the method doNothing() at their disposal, so you can call it from e0, e1 and e2.

However, the arguments of this method are Example1 and Example2, so you cannot pass Example0 as a first argument, and you cannot pass Example0 or 1 as a second argument. That only leaves answer E.

You can call the inheritance relation an "is a kind of" relation. So Example1 is a kind of Example0, and Example2 is a kind of Example1, but also Example2 is a kind of Example0.

Now you can understand why e2 can be passed as an argument for Example1, because e2 is a kind of Example1.

Other Questions
Solve: 3x+9x+6 = 0Thank you. WILL GIVE BRAINLIEST who was named the first u.s. national youth poet laureate? Given x+2y=-6 solve for y y= x-6/2 y= -x+6/2y= -x-6/2 why were the first crusades more of pilgrimage than a military operation? Please help, very urgent!!!! 50 points!! Please help!! El pastor corre y _______: Ovejatonta, no corras!" hi my name is coolboy123hillok Help ASAPRead the selection from the Shel Silverstein poem "Dirty Face" below. Inwhat voice is the poem written? I got it from crawling along in the dirtAnd biting two buttons off Jeremy's shirt.I got it from chewing the roots of a roseAnd digging for clams in the yard with my nose.A. in the rhythmic voiceB. in the present tense voiceC. in the rhyming voice A-B-A-BD. in the voice of a mischievous child Please help me with my math problem!! NO LINKS PLEASE!! IT IS DUE TONIGHT AT 11:59PM!! WILL GIVE BRAINLIEST!! :) Statement of cash flows (partial) I am so bad at this.Do you know the answer? Which questions would most help a reader identify the author's purpose for writing? Select three options.AbelWhat type of text is this?What type of reviews did the book receive?O How many copies of the book have been sold?What is the central idea?D How does this text make one feel? In your opinion, was the ColumbianExchange good or bad for humanity? Defend your answer with examples. A researcher wants to conduct a study to see if playing chess improves memory. The researcher finds 50 individuals who play chess regularly and 50 that do not. Each of the 100 individuals are given a questionnaire designed to determine memory level. If the 100 individuals did not know they were participating in the study, which statement about the study is correct?. please help me rn rn Versailles treaty Please answer (30 points) Find the value of x in the figure. i bragged about the 1759 conspiracy and caused it to be revealed. Who am I? After deducting grants based on need, the average cost to attend the University of Southern California (USC) is $27,175 (U.S. News & World Report, Americas Best Colleges, 2009 ed.). Assume the population standard deviation is $7,400. Suppose that a random sample of 60 USC students will be taken from this population.a. Refer to Exhibit 2. What is the value of the standard deviation of the mean? (Note: keep two decimal places.)b.What is the probability that the sample mean will be more than $27,175c.What is the probability that the sample mean will be within $1,000 of population mean? (Note: keep two decimal places for the z value and four decimal places for the final probability value.)d.What would be the probability in Part c if the sample size were increased to 100? (Note: keep two decimal places for the z value and four decimal places for the final probability value.)