How I to turn this ''loop while'' in ''loop for''? var i = 0; while (i < 20) { var lineY = 20 + (i * 20); line(0, lineY, 400, lineY); i++; }

Answers

Answer 1

Answer:

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

lineY = 20 + (i * 20);

line(0, lineY, 400, lineY) }

Explanation:

First declare and initialize the variable i. You have not specified the data type of i so if the data type of i is integer i.e. int then you should declare i variable in the for loop as for(int i = 0; i<20;i++)

So the given while loop has a variable i which is initialized to 0. Then while(i<20) means that while loop executes until the value of i exceeds 20. If this while condition is true then the two statements inside its body will execute. The two statements are: lineY = 20 + (i * 20);

line(0, lineY, 400, lineY);

The value of i ins incremented after each iteration i.e. i++

So while loop has the following syntax"

1) initialization;  ---->  i = 0

2) while(condition) {  ----> i<20

3) loop body ----->  lineY = 20 + (i * 20); line(0, lineY, 400, lineY);

4) increment or decrement loop variable  } ----> i++

For loop has the following syntax:

for( initialization of loop variable ; condition; decrement/increment loop variable)  {

loop body }

Here:

initialization  ---->  i = 0

condition        ----> i<20

loop body     -----> lineY = 20 + (i * 20); line(0, lineY, 400, lineY);

increment or decrement loop variable  ---->  i++


Related Questions

The best advice for setting a study session is

Answers

to take breaks and not do all the work at once.

Answer: A

Explanation:

Find dy/dx and d2y/dx2. x = t2 + 5, y = t2 + 5t dy dx = Correct: Your answer is correct. d2y dx2 = Correct: Your answer is correct. For which values of t is the curve concave upward? (Enter your answer using interval notation.) Changed: Your submitted answer was incorrect. Your current answer has not been submitted.

Answers

Answer:

The answer to this question can be defined as follows:

Explanation:

Given value:

[tex]x = t^2 + 5......(1)\\\\ y = t^2 + 5t........(2)[/tex]

To find:

[tex]\bold {\frac{dy}{dx} \ \ \ and\ \ \ \frac{d^2y}{dx^2} = ?}[/tex]

Differentiate the above equation:

equation 1:

[tex]\frac{dx}{dt}= 2t.......(1)\\[/tex]

equation 2:

[tex]\frac{dy}{dt}= 2t+5[/tex]

Formula:

[tex]\frac{dy}{dx}= \frac{\frac{dy}{dt}}{\frac{dx}{dt}}\\\\[/tex]

[tex]\boxed{\bold{\frac{dy}{dx}=\frac{2t+5}{2t}}}[/tex]

To calculate the [tex]\bold{\frac{d^2y}{dx^2}}[/tex] we Differentiate the above equation but before that first solve the equation:

Equation:

[tex]\frac{dy}{dx}=\frac{2t+5}{2t}[/tex]

    [tex]=\frac{2t}{2t}+\frac{5}{2t}\\\\= 1+\frac{5}{2t}\\\\=1+\frac{5}{2} t^{-1} \\[/tex]

Formula:

[tex]\bold{\frac{d}{dx} \ x^n = nx^{n-1}}[/tex]

[tex]\frac{dy^2}{dx^2}= 0+\frac{5}{2} (-1 t^{-2})\\\\[/tex]

      [tex]= -\frac{5}{2} t^{-2}\\\\= -\frac{5}{2 t^2} \\\\[/tex]

[tex]\boxed{\bold{\frac{d^2y}{dx^2}=-\frac{5}{2t^2}}}[/tex]

Answer:

d2y dx2

Explanation:

What process is used to convert numbers between the binary system and the decimal system? (A.)Enter the number in a calculator, divide by 2, and multiply by 10.,(B)Convert each binary number to a letter, then use the letter’s place in the alphabet as the decimal representation ( e.g., A = 1, B = 2),(C.)Add up the digits in the binary number and place the sum behind a decimal point,(D.)Look up the number on a binary-to-decimal conversion table.

Answers

Answer:

(D.)Look up the number on a binary-to-decimal conversion table.

Explanation:

Though there are other ways of converting binary-to-decimal but from the given list of options, the best option that describes this conversion is option D.

Analyzing each of the options;

Option A

A binary number can't be converted to decimal by merely dividing it by 2 and multiplying the result by 10;

Take for instance; 11 in binary;

Divide by 2

11/2 = 5.5

Multiply result by 10

5.5 * 10 = 55

This final outcome is incorrect; as 11 in binary = 3 in decimal

Option B

This is also incorrect because as there is no room for alphabets in binary representation of numbers

Option C

This will also give an incorrect result;

Take for instance 11

Add up the digits

1 + 1 = 2

Place a decimal point behind;

This gives 2. or 2.0

This final outcome is incorrect; as 11 in binary = 3 in decimal

Option D

Looking up the number on a conversion table gives the accurate result

There are different types of conversion process. The process used to convert numbers between the binary system and the decimal system is to Look up the number on a binary-to-decimal conversion table.

Binary to decimal conversion is often done to show a number that is listed out in binary number system to its equivalent usually in decimal number system.

For easy conversion, one can Divide the binary number by 2 and write out the remainder. Thereafter you can divide by 2  again and write remainder and this process continue till the last remainder becomes 1 .

After that write all the remainders in the (0 , 1)  order. With this, the decimal is converted into binary.

Learn more about binary from

https://brainly.com/question/4467709

CO! Oher...9
pressure
14.
large
The barometric height in a town is 65cmHg. Given that the standard atmospheric pressure
is 76cmHg and density of mercury is 13600kg/m", determine the altitude of the town. (Density of
(3mks)
air is 1.25kg/mº).​

Answers

Answer:

Altitude of the town(h1) = 1,196.8 m

Explanation:

Given:

Height of barometer(h) = 65 cm Hg = 0.65

Standard atmospheric pressure  = 76 cm Hg = 0.76

Density of mercury(Pm) = 13,600 kg/m³

Density of  air (Pa) = 1.25 kg/m³

Find:

Altitude of the town(h1)

Computation:

Pressure due column = Δp mercury column

(Pa)(h1) = (Pm)(h)

(1.25)(h1) = (13,600)(0.76-0.65)

(1.25)(h1) = 1,496

Altitude of the town(h1) = 1,196.8 m

Which statement is false? Select one: a. A class is to an object as a blueprint is to a house. b. Classes are reusable software components. c. Performing a task in a program requires a method. d. A class is an instance of its object.

Answers

Answer:

A class is an instance of its object

Explanation:

Consider a Rational class designed to represent rational numbers as a pair of int's, along with methods reduce (to reduce the rational to simplest form), gcd (to find the greatest common divisor of two int's), as well as methods for addition, subtraction, multiplication, and division. Why should the reduce and gcd methods be declared to be private.

Answers

Answer:

There is not a reason for the two methods to be private unless you want to only allow objects of the class Rational to have access to these methods.  Perhaps your professor has a particular reason for requiring it to be set up as such.

Explanation:

The use of the private space simply restricts access to either variables or methods contained within the space to the class object that is associated with the variable or methods.

The use of the public space allows the method or variable to be accessed from anywhere within the program.

Note, if using class inheritance, classes that inherit from the Rational class will not be able to access the private functions.

When an "is a" relationship exists between objects, it means that the specialized object has Group of answer choices Some of the characteristics of the general object, but not all Some of the characteristics of the general class, but not all, plus additional characteristics None of the characteristics of the general object All the characteristics of the general object, plus additional characteristics

Answers

Answer:

All the characteristics of the general object, plus additional characteristics

Explanation:

In case when an is a relationship exists between objects. Here is a relationship refers to a relationship in which there is a reference of one class to another class.

So this represent that the specialized object contains all the attributes of a general object along with it it also involved the extra attributes

Hence, the last option is correct

How do I make my kali Linux faster in my virtual box?

Answers

Answer:

If you run any operating system as a VM, it is going to be slower than if you were to run it as a native OS. You can, however, make a VM run faster by allocating more CPU cores and RAM to it in your hypervisor's (such as Virtualbox or VMWare) settings menu for your VM.

does that make sense?

What VM are you using? if your using virual box then try adding more RAM to it. I use VMware player 16 and its REALLY fast so try that. Also, go on online and look up this guy called network chuck.

By what decade were books readily available to the public across the United States and Europe? A. 1690 B. 1750 C. 1860 D. 1820

Answers

Answer: 1820

Explanation:

I believe the answer is the 1820, as the introduction of steam powered printing presses and steam powered paper mills significantly lowered the cost of books to decrease and significantly increased their circulation/availability.

hope this  helps

-lvr

What is the best use of a line chart? (A.)to show parts of a whole while emphasizing specific data,(B.)to compare and contrast discrete categories of data,(C.)to display data that changes over time(D.)to display data points that are unconnected and distinct

Answers

I think the answer to the question is C

Which of the following statements is true? A. Ethernet connections allow the most mobility for users. B. Maximum advertised connection speeds are for Wi-Fi connections only. C. Every computer user can expect the same Internet connection speed. D. The actual speed of a network can differ from the maximum advertised speeds. E. Wi-Fi is the best option for intensive Internet users who have high data

Answers

Answer:

A

Explanation:

Ethernet connections allow the most mobility for users

Employees often have more than one laptop-so one or both of them are always handheld. For this cause, companies turn to the versatility and scalability of wireless networks. It is convenient to grant workers connectivity through a wireless network, which they can use to connect several devices. Tablets, smartphones and laptops can all be connected to the network, which enables employees to access

Answer: D. The actual speed of a network can differ from the maximum advertised speeds



Explanation:

just got it correct on the test

What are the flowchart symbols?​

Answers

Answer:Flowchart use to represent different types of action and steps in the process.These are known as flowchart symbol.

Explanation:The flowchart symbols are lines and arrows show the step and relations, these are known as flowchart symbol.

Diamond shape: This types of  flow chart symbols represent a decision.

Rectangle shape:This types of flow chart symbols represent a process.

Start/End : it represent that start or end point.

Arrows: it represent that representative shapes.

Input/output: it represent that input or output.

Identify the statement below which is true. Cloud computing eliminates the need for companies to own their own software and servers. Cloud computing is a control technique for system availability. Cloud computing eliminates the need for backup of applications and data. Cloud computing refers to the practice of storing application files and backup data on satellites "in the clouds."

Answers

Answer:

The answer is "Cloud computing is a control technique for system availability".

Explanation:

The term cloud computing provides on-demand computer network services, which including storing data (information) and computing resources, without client-specific active management. Its definition is often used to identify network infrastructure for several web users, that's why the above choice is a correct and wrong choice can be described as follows:

It also needs in businesses with using their apps and servers but can't be removed, that's why it is wrong  It does n't  only one the satellites, that's why it is wrong  It is used for storing data not for removing, that's why it is wrong.

Common concerns with backups are disk failure, lack of redundancy, and the necessity of future growth of disk capacity. Which backup method adresses these concerns and has multiple levels of use depending on how you want to prioritize features like performance, capacity, or reliability

Answers

Answer:

RAID Array

Explanation:

Backups are needed in the IT industry to take care of some harm that can affect data resulting in its lose. RAID is the acronym for Redundant Array of Independent Disks. RAID combines multiple physical disks into a large virtual disk. It has different levels which range from 0, 1, 5, 6, and 10. RAID has a high degree of optimizing the data capacity of a backup device and its different levels prioritize features like performance, capacity, and reliability.

It also accommodates the future growth of disk capacity and reduces to the minimum the risk of data loss. It is very useful in ensuring data storage.

A user's computer will not boot. A technician notices four indicator lights on the backside of the
computer. Two of the lights are green, and two are amber. Which of the following documentation
should the technician read to determine what the lights are indicating?
A. Network diagram
B. Computer manual
C. Asset management
D. Wiring scheme

Answers

Answer:

B.

Explanation:

Computer manual is the user guide that comes along with the computer set to inform the users about the functions, ways to assemble the parts, and so on.

The user manual consists of guide for the users specially for electronic products such as computers, refrigerators; softwares, and so on. These manuals are written by technical writers, programmers, etc.

In the given scenario the technician needs to refer to computer manual to know the meaning of the lights on the backside of the computer.

So, the correct answer is option B.

Which of the following is a true statement about milestones?
O A. Meeting milestones contribute to the meeting of a key deliverable.
O B. Milestones are the high level events or actions in a schedule.
O C. Milestones are a helpful but not essential part of a schedule.
O D. Most milestones concern the delivery of a product.

Answers

Answer:

B option

Explanation:

my stones are the high level events are actions in a schedule.

Brainly won't let me see any answers. I've been trying to check my answers for 45 minutes now. I am unable to see ANY answers at all. Please help. I really need to finish all my work by tonight. *URGENT*

Answers

Answer:

I'm having the same problem. I think it has something to do with the Honor Code

Explanation:

Does anyone know how to fix this problem My kali Linux is getting stuck on the failed to send host log message the first time I run it but when I reset it it gets fixed but I wanna stop it from freezing and getting stuck on that error message

Answers

Update it, or just get a new Linux

Answer:

Is

Explanation:

You should check with a person repairing computers or call him and ask him Wats the problem with your pc or laptop or computer. This is just a suggestion. U can also get what to do from sites in the internet.

Hope this helps....

Have a nice day!!!!

Which one of these tasks best describes the process of localization?

Answers

Answer:

Localization is the process of adapting the project and service at a particular language.

Explanation:

Localization is that adapted to the product and service that need a desired to the popular look and feel.

Localization is to perform that including changing the local culture.

Localization is addition to perform the such details and time zone ,local color, holiday and name translation, money all to be considered.

Localization can sometimes  be perform with automatic language translation.

Localization that requirement to the enabling product to be different national product known as globalization.

what is the best phone company that sells long lasting battery life phones?​

Answers

Answer:

A lot of people won't agree with me, but I have had phones from a variety of companies and found Motorola phones to be by far the best.

Explanation:

Answer:

apple but sometimes the batterys be breaking  fast lol

Explanation:

Referential integrity states that:______.
A. Something assigned to an attribute when no other value applies (N/A) or when the applicable value is unknown;
B. Values of an attribute must be taken from a pre-defined domain;
C. No primary key attribute (or component of a primary key) can be null;
D. Each foreign key value MUST match a primary key value in another relation or the foreign key value must be null;

Answers

Answer:

D. Each foreign key value MUST match a primary key value in another relation or the foreign key value must be null.

Explanation:

In Computer programming, integrity constraints can be defined as a set of standard rules that ensures quality information and database are maintained.

Basically, there are four (4) types of integrity constraints and these are;

1. Key constraints.

2. Domain constraints.

3. Entity integrity constraints.

4. Referential integrity constraints.

Referential integrity states that each foreign key value must match a primary key value in another relation or the foreign key value must be null.

For instance, when a foreign key in Table A points to the primary key of Table B, according to the referential integrity constraints, all the value of the foreign key in Table A must be null or match the primary key in Table B.

Hence, the referential Integrity constraints ensures that the relationship between the data in a table is consistent and valid.

Meaning of software

Answers

Answer:

Is a collection of data or computer instructions that tell the computer how to work.

Explanation:

Case-Based Critical Thinking Questions Case 1-2 Ted is asked to create a page containing his family photos for a family reunion website. He has about 20 pictures to post, with a caption that he wants to display before each one. Each picture is a group photo of a particular family. Which tag will Ted need to use to display the pictures

Answers

Answer:

Image tag or <img> tag

Explanation:

HTML refers to Hypertext Markup language. In this, we can be designed our documents by applying the font, color, image i.e to presented in the web browser. It is used for creating the webpages

Since in the question, Ted has approx 20 pictures for the post having caption and wants to display the picture so he needs to use the image tag or <img> for displaying the pictures. This tag is used for linking the images for the web pages you have created

Before Class B network 172.16.0.0 is subnetted by a network engineer, what parts of the structure of the IP addresses in this network already exist, with a specific size? (Choose two answers.)

Answers

Answer:

Host and network.

Explanation:

The parts of the structure of the IP addresses in this network already exist, with a specific size,  are Host and network.

A college marketing department has a networked storage device that uses the IP address 10.18.7.5, TCP port 443 for encryption, and UDP port 4365 for video streaming. The college already uses PAT on the router that connects to the Internet. The router interface has the public IP address of 209.165.200.225/30. The IP NAT pool currently uses the IP addresses ranging from 209.165.200.228-236. Which configuration would the network administrator add to allow this device to be accessed by the marketing personnel from home

Answers

Answer:

The answer to this question can be defined as follows:

Explanation:

The static NAT stands for (static Network Address Translation), which enables the user to modify a single interpretation for a local second-order to the external environment addresses, and all IP and port numbers were also transcribed inside to random traffic as well as from outside with the internal traffic.

It is used to map network traffic by an internal IP address from a static external IP address. It provides a fixed conversion for actual addresses onto maps. It offers Internet access to the network equipment via a private LAN with such a private IP address which is not recorded.Please find the attachment of the ip address.

Which of the following statements is false? a. The Java API consists of packages. b. The Java API helps programmers avoid "reinventing the wheel." c. The Java API consists of import declarations. d. None of the above.

Answers

Answer:

The answer is "Option c".

Explanation:

In Java programming, the API stands for "application programming interface", which is also known as the lists of all classes in the JDK. It contains all packages, classes, and interfaces, with their techniques, fields. It is a built-in class, which gives the programmer a great deal of usability, and correct choices can be described as follows:

In option a, It is correct because it imports the package to use API. In option b, It allows you to "re-invent the wheel" by developers, that's why it is correct.

etwork behavior analysis system __________ sensors are typically intended for network perimeter use, so they are deployed in close proximity to the perimeter firewalls, often between the firewall and the Internet border router to limit incoming attacks that could overwhelm the firewall.

Answers

Answer:

"Inline" is the correct answer.

Explanation:

Network behavior analysis (NBA)  or Analysis of network activity seems to be the technique to observe traffic trends that aren't groups or sets throughout the cable network's everyday traffic. Simplest terms, this is the organization's effort to define network anomalies outside pure congested traffic expect a seamless.

So that the above is the correct answer.

The preferred means of creating multithreaded Java applications is by implementing the ________ interface. An object of a class that implements this interface represents a task to perform.

Answers

Answer:

Runnable.

Explanation:

Java is an all round programming language which is typically object-oriented and class-based. It was designed by James Gosling, developed by Sun microsystems and released officially on the 23rd of May, 1995. Java programming language is designed to have only a few implementation dependencies as possible because it was intended to be written once, and run on any platform.

Java makes concurrency to be available to software developers through the application programming interface (API) and the language. Also, it supports multiple threads of execution, by making each thread have its respective program counter and method-call stack, which then allow concurrent executions with other threads.

The preferred means of creating multithreaded Java applications is by implementing the runnable interface. An object of a class that implements this interface represents a task to perform. The code is public void run ().

Dr. Garcia is a business professor at a large state college. At the start of each workday, he opens a Web browser on his office computer and accesses the university’s Web site. From there, he logs into his institution’s "MyCollege" portal with his username and password. From the portal he can access his email, Web pages for each of his courses, and confidential information about the students he advises. Most likely, Dr. Garcia is using what kind of network when using the portal?

Answers

Answer:

b. Intranet

Explanation:

An intranet refers to the private network that used to sharing the information, for collaboration, connecting the servcies, etc. It can be accessed by only the users who are authorized to use it. Plus, it only used inside the outside organization

So according to the given situation, since Dr Garcia has his credentials that represents the confidential information so it is an intranet netwrok

Question 3 of 10
What is one advantage of video tutorials about maintenance and repairs?
O A. Video tutorials help you fix problems by doing the work for you.
O B. Sometimes, seeing a picture of the process is more helpful than
reading about it.
O C. Video tutorials are easier to make than written guides.
O D. Video tutorials cannot do the repair or maintenance for you.
SUBMIT
PREVIOUS​

Answers

Answer:

B. Sometimes, seeing a picture of the process is more helpful than  reading about it.

Explanation:

Video tutorials are a form of communication in which the instructions are given through video instructions. The users drive more information from video tutorials than written or audio. The visual and the auditory aids together helps in creating a better impact on the users. The video tutorial is more user friendly and can easily be controlled by the user. This helps in better understanding and analyzing the information.

Answer: B. Sometimes, seeing a picture of the process is more helpful than reading about it.

Explanation: took the quiz

Other Questions
Where is the function increasing?A)1B)3< X C)-infinity < x < 1D)-infinity It is often said that people should be rewarded for doing a given job in proportion to the effort it costs them to do it. However, a little reflection will show that this is, in fact, a very bad idea, since it would mean that those people with the least skill or natural aptitude for a particular task would be the ones given the most incentive to do it. Which one of the following argumentative strategies is used above? (A) stating a general principle and then presenting reasons in favor of adopting it (B) providing evidence that where the principle under discussion has been adopted, the results usually have been undesirable (C) demonstrating that a consequence that had been assumed to follow from the principle under consideration need not follow from it (D) attempting to undermine a general principle by arguing that undesirable consequences would follow from it (E) showing that, in practice, the principle under consideration could not be uniformly applied which point on a graph shows minimum wage as the price floor ASAP PLS!!!!!!!!!!!!!!Which action did President Johnson take during the Vietnam War?He increased financial aid to South Vietnam.He decreased support for the South Vietnamese military.He authorized the replacement of the president of South Vietnam.He took over the South Vietnamese government to foster capitalism. True/False Use your knowledge of formal and informal fallacies to determine which of the following statements are true. Check all that apply. Some fallacious deductive arguments are valid. Informal fallacies never occur in deductive arguments. Arguments that commit a formal fallacy can sometimes be made into valid arguments by rearranging the letters that are used in the argument's form. There are multiple distinct types of informal fallacies. Some defective arguments do not have false premises. All defective arguments commit a fallacy. Some fallacious deductive arguments are sound. To detect an informal fallacy, you must know something about key content words in the argument. Fallacies that try to distract a listener from the rational implications of an argument by making pejorative claims about the argument's author are formal fallacies. Some uncogent arguments neither contain false premises nor commit a fallacy. Formal fallacies never occur in inductive arguments. Not all fallacious arguments have false premises. Any argument with false premises is a fallacious argument. You never need to examine content words when inspecting arguments for informal fallacies. Fallacious arguments never have false premises. . What is the percentage of VanArsdel's manufactured goods sold in Alberta? (to two decimal places in the format 00.00, without the % sign) Please Help!!!! Which statement is true about the end behavior of the graphed function? A: As the x-values go to positive infinity, the function's values go to negative infinity. B: As the x-values go to zero, the function's values go to positive infinity. C: As the x-values go to negative infinity, the function's values are equal to zero. D: As the x-values go to negative infinity, the function's values go to positive infinity. What does Jesus show about how to live a human life in a divine way based from Jesus Baptism? Explain? Rewrite the equation of the circle (x + 2)^2 + (y + 5)^2 = 9 in general form. The robot HooRU is lost in space, floating around aimlessly, and radiates heat into the depths of the cosmos at the rate of 13.5 W. HooRU's surface area is 1.51 m^2 and the emissivity of its surface is 0.209. Ignore the radiation HooRU absorbs from the cold universe. What is HooRU's temperature? Which one is the Informal and formal for these sentences ( I need some tea) ( I could do with a cup of tea) ? Cause: Hitler took control of the economy. Effect: Unemployment among men . One stats class consists of 52 women and 28 men. Assume the average exam score on Exam 1 was 74 ( = 10.43; assume the whole class is a population). A random sample of 16 students yielded an average of a 75 on the first exam (s=16). What is the z-score of the sample mean? Is this sample significantly different from the population? (Hint: Use the z-score formula for locating a sample mean) qu estrategias propondras para prevenir los conflictos o evitar que se produzca la violencia entre los pobladores o entre estos y las autoridades que velan por el cumplimiento de las normas? Southeast Asia contains one of the most important shipping channels, a choke point for the movement of Seaborne trade goods around the world. It is located between which two countries? A buyer and a seller enter a contract for the sale of a three-bedroom residential property. Shortly after the contract is in place, the buyer has an inspection done. As a result of the inspection, the buyer wants the seller to fix the fence and replace the garage door opener. The seller refuses. How should the parties proceed 2HCl(aq) + Ba(OH)2(aq) BaCl2(aq) + 2H2O(l) H = 118 kJ Calculate the heat when 250.0 mL of 0.500 M HCl is mixed 500.0 mL of 0.500 M Ba(OH)2. Assuming that the temperature of both solutions was initially 25.0 oC and that the final mixture has mass of 750.0 g and a specific heat capacity of 4.18 J oC1g1, calculate the final temperature (in oC) of the mixture. Select the correct answer.What is the exact solution to the system of equations shown on the graph? On the graph of an exponential function representing growth what happens to the slope of the graph as X increases an elastic cord 61 cm long when a weight of 75N hangs from it, but 85cm when a weight of 210N hangs from it. what is the spring constant of the cord