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 variable dp is to refer to an array of double. Assuming the integer variable n has been assigned a value, declare dp appropriately, allocate an array of n doubles and assign the resulting pointer to dp.

Answers

Answer:

double × dp = NULL ;

int n;

n = <some value> ;

dp = new double[n]

Explanation:

According to the given question, the relevant data provided is as follows

Variable dp = Array of double

Based on the above information,

The allocation of an array for doubling n and assigned it to dp is here below:

double × dp = NULL ;

int n;

n = <some value> ;

dp = new double[n]

Hence, the above is the answer

The ___________ button represents the start of a hyperlink in Table of contents.

Answers

Answer:

An LS button

Explanation:

It appears on the (structure line 3)on the structure line, place your cursor in the white field to the right of the E button (Recall that the E button represent the entry test).

write some Drawbacks of the internet

Answers

Explanation:

Computer Virus can spread.

Data can be hacked.

It has made peoples lazy

It cannot work about electricity and mobile and computer like devices

..

Thank me if you like.. and follow me..

The internet is like a double-edged sword. It can be used as a study tool, and is full of an endless amount of information. Additionally, programs such as email allow the communication of ideas to be faster than ever before. The internet has increased globalization by a large amount. However, the internet can also be a huge distraction. Social media and games can make the younger generations more self conscious and wanting more instant gratification. Nonetheless, the internet is something that has forever changed both society as a whole and the way each person sees the world.

Justify the statement "The same job title can have different job roles and different qualification criteria in different organizations." Compare job titles and their respective roles and qualifications from at least two organizations in different industries, and write a short essay explaining your reasoning.

Answers

Answer:

Below is an executive summary of this particular issue.

Explanation:

Each organization has differential requirements and preferences. This same employment opportunities rely heavily on either the structure of the company and indeed the amount of equipment that it possesses. Hence, whenever they recruit an individual on a specific job, their work description can differ based on the organization's needs including growth.

Answer:

In the classified section of a local newspaper, I came across job openings for the post of a network engineer in two different companies. One was from the airline industry, while the other was from the food and beverage industry.

The airline company required an applicant to have a bachelor's degree in network administration. The job posting specified that applicants with supporting CCENT or CompTIA Security+ certifications would be preferred. The company was willing to consider candidates with no prior experience. The job responsibilities included: maintaining security, DNS, IP routing, firewalls, and troubleshooting IT-related problems. The role also required skills to manage multi-site network operations, operating systems, and other software applications in public as well as private facilities. Another responsibility was to complete the time logs in the company's records to facilitate timely and accurate billing.

For the role of a network engineer in the food and beverage industry, the required qualification was any bachelor's degree in computer science with a minimum of one year of relevant experience. Certifications were an added advantage, but they were not a necessity. The job role required skills to troubleshoot network glitches, monitor network usage, install software and hardware infrastructure, provide technical assistance to users, and suggest improvements in the system.

Explanation:

can a 0.90 GB storage left android phone download an app of 28 MB plsssss fast I will give you brainliest why and why not?

Answers

Answer:

Yes

Explanation:

0.9 GB = 900 MB. That is a plenty of space for a 28 MB app.

Other than hard discs and flash discs, identify other three different storage media

Answers

Answer:

A storage media is any media that can store data.

1. USB flash memory

2. Memory stick

3. Floppy disk

Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binary. For an integer x, the algorithm is: As long as x is greater than 0 Output x modulo 2 (remainder is either 0 or 1) Assign x with x divided by 2

Answers

Answer:

Following are the code to this question:

def binarynumber(num):#defining a method binarynumber that accepts a parameter num

   x=""#defining a string variable x

   if (num!=0):#defining if condition to check number not equal to 0

       while (num>=1):#defining a loop that check value is grater then equal to one

           if (num %2==0):#defining if condition to check num is even

               x=x+"0" #add string value 0 in num variable

               num=num/2 #divide the value by 2

           else:#defining else block

               x=x+"1"#add string value 1 in num variable

               num=(num-1)/2#first subtract 1 into num variable then divide the value by 2

   else:

       x="0"#assign string value 0 in num variable  

   return "".join(reversed(x))#return value

num = int (input ("Enter any number: "))#defining num variable that input the integer value

print (binarynumber(num))#using print method to call method binarynumber with passing num parameter

Output:

Enter any number: 12

1100

Explanation:

In the above python code a method "binarynumber" is declared, in which the "num" variable passes as the parameter inside the method a string variable "x" is declared that stores all converted values. Inside the method and if the block is declared that checks number value is not equal to 0 if this condition is false then it will add string value and reverse its value. Or if the condition is true it defines a while loop that calculates the given number binary digits and returns its value. At the last step, the num variable is declared that inputs the integer value from the user end and calls the method by using the print method.    

What is the role of bpo in growth of Indian economy ?

Answers

Answer:

BPO Role in India's Economic Growth

The role played by BPOs in boosting India's economy shows that the IT and ITeS sector have been contributing largely to the economic growth of India. The growth in the contribution of BPOs to Gross Domestic Product has shown a steady rise from 1.2% to 5.4%.

Computer security is concerned with protecting information, hardware, and software from unauthorized use, as well as preventing or limiting the damage from intrusions, sabotage, and natural disasters.
a) true
b) false

Answers

The correct answer is True

Explanation:

Computer security is a branch of security that focuses on the security of computer systems. This includes preventing cyber attacks that could steal the information or damage the software (programming code), as well as, preventing physical attacks or damage, this includes stopping unauthorized personnel from accessing the computers or devices and limiting the damages that might occur in situations such as fires, floods, etc. Additionally, computer security is now an important factor in most companies and organizations as relevant information is saved in computers, also, many functions rely on the use of computer systems.

According to this, the statement about computer security is true because this comprises the protection of hardware, software, and information in cases such as natural disasters, intrusions, etc.

GuardIN is an IT security firm. It deals with highly secure data for a wide variety of software and e-commerce agreements, trademark licenses, and patent licenses. GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself. The cloud also needs to be designed in such a way that all users of the organization can access it without any lag. Which of the following cloud computing options would be most suitable for GuardIN?
A) A public cloud
B) A community cloud
C) A hybrid cloud
D) A private cloud

Answers

Answer:

D) A private cloud

Explanation:

Note we are told that GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself.

Thus, to be able to manage the cloud infrastructure itself; it implies buying it's own hardware equipments, which means it is best to use a private cloud computing option.

Doing so would give GuardIN the opportunity to design the cloud storage in a way that all users of the organization can access it without any lag.

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.

MULTIPLE CHOICE When you log in to a browser, such as Google Chrome, you are accessing a profile that you can save and use on many different devices. What are some of the personal preferences you can save to your user profile for a browser? Select all that apply.

Answers

Answer:

The personal preferences that can be saved are

A. Customize your bookmark bar

C Change your home page

D Enable safe browsing in your privacy setting

Explanation:

The Bookmark manager can be used for personal customization of the bookmarks in chrome

The Bookmark manager is located within the customization button located at the top right hand corner of the browser under bookmarks

The personally preferred homepage can be selected under appearance category in the settings menu

The enable safe browsing preferences can be found under privacy and security sub menu within the settings menu window.

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!!!!

Write a method, getFirstLine, that is passed a String argument and that returns the first line. (Recall that lines are terminated with the "\n" character.) Assume that the argument contains at least one complete, newline-terminated line.
My Solution:
public String getFirstLine(String a)
{
String[] myLines = a.split("\n");
return(myLines[0]);
}

Answers

Answer:  The answer to this question can be given as:

Method definition :

String getSecondLine (String aString) //define function getSecondLine()

{

return aString.substring(aString.indexOf("\n") + 1, aString.indexOf("\n") + 1 + aString.substring(aString.indexOf("\n") + 1, aString.length()).indexOf("\n"));

//return value.

Explanation:

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.

A binary search function is searching for a value that is stored in the middle element of an array. How many times will the function read an element in the array before finding the value?

Answers

Answer: 1 time.

Explanation:

A binary function is also known as a half-interval search is a search algorithm to find the position of a given element x within a well-sorted array []. Binary search compares the target value to the middle element of the array.It ignores half of the elements just after one comparison. it compares x with the middle element.

So, the function read an element one time in the array before finding the value.

B. Imagine yourself to be a tube light. Write a short paragraph about your life. (50 to 80 words)
plese help me​

Answers

Do you know LED light- I mean the tubelight that people perch and switch it on. It is used in offices, homes, schools and anywhere there are tube lights but I am something different. I am that light that shines on children’s head.

Ok, it is not actually a light in children’s head. It’s when they think of an idea so they are switching me on and they spread that means they are allowing me to shine. My head means the base is the brain that tells me that this idea is there so I shout and spread it.

Like that I was also a light in a boys head his name was Rahul. Rahul was a boy that when his mind is on studies he can top in his class but he was not understanding that he was only focusing on his sports.

One day in the classroom didi said that there is a problem that in our school there is a problem that out toilets are stinking and we need help from you children. All the lights around me were flickering because all the children were thinking of ideas. I was the only one of them who was not flickering. Rahul switched me on and let me shine, he spread it. I also know that he is not going to shatter me into pieces. He is going to persevere and he did it.

From that day, it was my daily life..on off..on off..on off..

if a person walks 10 metres due to south in 10 seconds 10 due east in the next 10 seconds and transmitted you're not in the next 10 seconds then he has Dash velocity​

Answers

Answer:

[tex]\frac{1}{3}\ m/s[/tex]

Explanation:

The computation of the velocity by using the following formula is

As we know that

[tex]Velocity = \frac{Displacement}{Total\ time\ taken}[/tex]

where,

Displacement is 10 meters

Total time taken is 30 seconds

Now placing these values to the above formula

So, the velocity of Dash is

[tex]= \frac{10\ meters}{30\ seconds}[/tex]

[tex]= \frac{1}{3}\ m/s[/tex]

We simply applied the above formula so that we can get the velocity and the same is to be considered

1. Who is the head of the family of the Lhops?​

Answers

This question is incomplete, here´s the complete question.  

Read 'Untrodden World of Lhops', by John Michael Chiramal

Who is the head of the family of the Lhops?​

Answer: the maternal uncle

Explanation:

The Lhops or Doyas are one of the smaller communities of Bhutan, isolated from the conventional rules of the Bhutanese society, they have the maternal uncle as the head of the family.  

Not only he has complete authority over the family´s everyday life, but he´s also in charge of the children´s upbringing and providing them with an inheritance of his property.

Which of the following statements is false? a. Java allows a class to implement multiple interfaces in addition to extending one class. b. Classes declared with implementation inheritance are tightly coupled. c. Classes declared with interface inheritance are tightly coupled. d. An interface also may extend one or more other interfaces

Answers

Answer:

The answer is "Option d".

Explanation:

In java, programming language interface is used to achieve the multiple inheritances,  that's why it used the extends keyword to inherit the interface to interface, that's why above given point is correct and \wrong choices can be described as follows:

The choice (a) is incorrect because it uses the implement keyword to inherit the class to an interface.  Choice b and choice c both are wrong because it can't be tightly coupled.

An interface consists of the shared boundary within the 2 separate components of the computer system of interchange.

The exchange takes place between the software computer and periphery devices. An interface cannot be extended to more than one devices. Hence e the option D is correct.

Learn more about the following statements are false.

brainly.com/question/17095049.

Tom walks into the accounting department and walks into a mess! User A can't access the Internet, User B has forgotten her password, User C's system is overheating to the point of smoking and the administrator is worried there might be a virus on all the systems. Whose system should he address first

Answers

Answer:

User C.

Explanation:

As per the given details, the problem of user C's system must be addressed first due to the seriousness of his case. His computer is excessively overheating up to the smoking point and if his problem is not addressed soon, it will damage the vital parts of the computer or may also explode. The other users having the problem of inability to access the internet or issue of forgotten password can be addressed later as these are minor problems that do not have as such consequences. Thus, user C is the correct answer.

what are the different categories of a computer

Answers

Answer:Computer is a machine that can be program to manipulate the symbols.

Explanation:There are five different categories of a computer.

(1)super computer (2) mainframe (3) personal computer (4) workstation

(5) minicomputer

(1)super computer: super computer is the term fastest computer available current time.super computers are very expensive and specialized computer.

(2)mainframe : mainframe computer is perform to the execute the program the currently.

(3) personal computer: The most popular use for personal computer playing games and surfing internet.

(4)workstation: This type of computer used for the engineer applications desktop publishing , software development.

(5)minicomputer: The general a minicomputer is multiprocessing system it is a midsize computer.

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.

Ryan is creating a website for an automobile company. He wants to include media files on the web page and make the page appealing to the viewers.
​Ryan wants a particular embedded media clip to automatically restart when it has finished playing. Which of the following HTML audio and video element attributes must Ryan include in his code to accomplish this?
A. ​src
B. ​loop
C. ​controls
D. ​preload

Answers

Answer:

I think it's preload :P

Explanation:

But just be sure with some sources ok ! :♡

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

You are working the 8:00 AM shift at the help desk. An irate user who fails to identify himself calls in claiming that his workstation is malfunctioning and that you need to fix it NOW. What is the first action you should take?

Answers

Answer:

Calmly ask him for his name and a more detailed explanation of the problem.

Explanation:

Since in the question,  it is mentioned that the anger use who fails to identify himself and claim that his workstation is malfunctioning and want to fix it now

Now the action which would be taken is to ask his name in a calmy manner and understand what the actually problem he is suffering by understanding it in a detailed way

Therefore according to the given case, the correct option is d.

A systems administrator is designing a directory architecture to support Linux servers using Lightweight Directory Access Protocol (LDAP). The directory needs to be able to make changes to directory objects securely. Which of these common operations supports these requirements?

Answers

The options available are:

Search, modify.

StartTLS, delete.

Bind, modify.

Bind, add.

Answer:

StartTLS, delete

Explanation:

StartTLS is a computer networking term for email protocol command, in which a system administrator buses it to command an email server that an email client running in a web browser, wants to turn an existing insecure connection into a secure one. Thus, during this process, StartTLS permits a client to communicate securely using LDAPv3 over TLS.

On the other hand, the DELETE operation can make a change to a directory object.

According to the given question, the common operations that supports requirements where directory needs to be able to make changes to directory objects securely are;

Bind, addSearch, modifyBind, modifyStartTLS, delet

According to the question, we are to discuss the common operations that supports some requirements as regards the changing of directory objects securely.

As a result of this we can see that making use of  StartTLS, delete can serve this purpose and other function as well.

Therefore, common operations that supports requirements where directory needs to be able to make changes to directory objects securely is Search and modify.

Learn more about directory architecture at:

https://brainly.com/question/13171394

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.

Thanks to the availability of computers, mobile devices and ISs, information flowing through companies is almost always available to executives, managers, and workers who no longer struggle to find information they need to make sound decisions or do their jobs.
a. True
b. False

Answers

Answer:

False

Explanation:

The advent of computers, mobile devices and ISs, information flowing through companies is almost always available to executives, managers, and workers who no longer struggle to find information they need to make sound decisions or do their jobs.

It has made information flowing through companies to be readily available to executives, managers and workers. It helps workers to make sound decisions and discharge their duties effectively.

Other Questions
How many solutions does this system have? x-y=-4 3x+y=8 one two an infinite number no solution P(n) models the probability, when rolling a pair of dice, of obtaining two numbers whose sum is n 2 6 7 P(n) 1/36 5/36 6/36 when does the probability increase faster? a)Between a sum of 2 and a sum of 6 b) Between a sum of 6 and a sum of 7 c)the probability increases at the same rate over both intervals Lines L and K are parallel to each other. Measure of angle A= 120 degrees, and measure of angle C= 80 degrees. What is the number of degrees in measure of angle B? Please answer ASAP! Thanks! What is 5/7 subtracted by 2/5 PLEASE HURRY I NEED HELP BAD An equation is shown below: 5(2x 3) = 5 Part A: How many solutions does this equation have? (4 points) Part B: What are the solutions to this equation? Show your work. (6 points) A linear inequality in one variable is a linear equation in one variable with the equals symbol replaced by an inequality symbol. True or False? Find each product.(5-x2+2)(-3)PLEASE HELP!!! ASAP!!! You turn on your Windows computer and see the system display POST messages. Then the screen goes blank with no text. Which of the following items could be the source of the problem?1. The video card2. The monitor3. Windows4. Microsoft word software installed on the system. Please explain study of variation patterns in different taxon. Please help me! I am struggling Iron man wears an awesome ironsuit.He is flying over high current carrying wire. Will he be affected? Let f(x) = 5x + 4 and g(x) = 2x + 1. Find the indicated value f(-2) plz respond quickly What marked the end of the Precambrian period? A. The appearance of complex, multicellular animals B. The division between archaea and eukarya C. The emergence of simple, protist-like animals D. The development of DNA-based viruses Mark for review (Will be highlighted on the review page) A piano has a mass of 99 kg. What is the weight of the piano?A. 1030 NB. 842 NC. 1129 ND. 970 NHelp!! Leave the explanation too please. What the answer now fast which structure acts as traffic police in the above passage?hi friends please answer to this question with the help of give passage in the pic I posted above.. please help me guys.. A sample of neon gas at a pressure of 0.609 atm and a temperature of 25.0 C, occupies a volume of 19.9 liters. If the gas is compressed at constant temperature to avolume of 12.7 liters, the pressure of the gas sample will beatm. Find the value of x in the isosceles triangle shown below. Which of the following is not true of deciduous forests?a.characterized by four seasonsb.trees lose their leaves in the fall.c.precipitation is concentrated in one seasond.averages 30-60 inches of precipitation annually