Intro to programming responses | Computer Science homework help

Provide (2) 200 words response with a minimum of 1 APA references for RESPONSES 1 AND 2 below. Response provided should further discuss the subject or provide more insight. To further understand the response, below is the discussion post that’s discusses the responses. 100% original work and not plagiarized. Must meet deadline.

RESPONSE 1:

An if-then script simply takes an argument from a variable and checks to see if it is true. If it is true, then it executes the parameter. If it is false, then it executes a different parameter which can be another defined variable or an exit condition. Loops repeats the processed if-then program as many times as indicated within the set parameters until an exit condition is reached. The loop needs an exit condition that can be met or it can become an endless loop, or infinite loop. An infinite loop can accidentally use up 100% of your CPU usage that will lock up your device or cause it to crash. Ways to avoid an endless loop is to always make sure to set an exit condition that can be met, or makes sense to the language you are programming in. There may be a “continue” statement with another variable that could be out of place preventing the code to move on and continuously loop. Another way to prevent infinite loops is to set timeout conditions in your code. Also, if you are working with complex loops that have the potential to be endless, you may consider testing your code first through a walk-through program, such as the Python Tutor we will be using in this class and others such as Google Chrome Dev Tools. This will allow you to step through and visualize what your program is doing.

Endless loops can create a denial of service (DOS). You may accidentally DOS yourself! In fact, you can set up a simple script that throws specific types of packets to a single router or switch interface (IP and port range) over and over again causing a denial of service effect. You can also overwhelm firewalls by doing this, especially if they are doing deep packet inspections. There are several quirky vulnerabilities out there listed in the MITRE CVE that has exploits like this already written and tested. Building a virtual range to test these out is a lot of fun and you learn networking quickly.

RESPONSE 2:

This week we learned about variables along with creating loops and if-then scripts. Our textbook, Microsoft WSH and VBScript Programming for the Absolute Beginner, 4th Ed. by Jerry L. Ford, defines a variable as “an individual piece of data such as a name, number, or date that is stored in memory” (2014, p. 85). Variables are the numbers, dates or names in which you are looking for or defining in your scripts. For example, in this week’s practice scripts, fnum, snum, and total were the variables that were being defined. Once we defined are variables, we were able to look more into loops and if-then scripts.

Loops are “collection of statements repeatedly executed to facilitate the processing of large amounts of data” (Ford, 2014, p. 144). Loops could be used to repeat a certain function until the end condition is met. For example, in this week’s practice loop script, we set a up a loop where the program would produce numbers between the first variable, fnum, to the second variable, snum. Once the computer reached snum, the condition was met and the loop ended. The if-then script we learned included a loop, however, the loop would only run if the second number we typed was greater than the first number we chose. If the first number was larger than the second number, the loop would not run. In order to run the loop, the condition must be met prior to the program running the script. The whole purpose of the if-then script is to determine if the argument depicted in the script is accurate based off the variables provided. If the variables make the script accurate then it runs; if not, then it doesn’t run the script.

When creating loops, individuals might incorrectly type an “exit function” or create an improper condition to stop the loop. If this happens, an endless loop could be created. Based off initial research, endless loops are not necessarily dangerous, but rather annoying. Most people can exit an endless loop by doing a hard-exit of the program, or even shutting down their computer. However, some individuals might create an endless loop in order to create a DoS (Denial of Service) attack. DoS attacks are meant to prevent a person from using a certain program, and if someone was stuck in an endless loop, they would not be able to use that program until they manage to exit or stop the loop.







Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Get 15% OFF on your FIRST order. Use the coupon code: new15