Computer Science Midterm Pt. 2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

A user created a purple using RGB of 170,0,170. They wish to make the color more red (closer to maroon) as well as darker. What color matches this requirement.

170,0,125.

A school has 450 students. One student has decided to collect data on these students through a survey. How many students would need to be surveyed to provide a result that is very accurate (within 95% confidence) without interviewing every student?

210.

What represents unstructured data?

A business card.

An algorithm was developed to keep track of how many baskets a student has made while playing basketball. What program structure must be added to the old algorithm to create a new algorithm that only keeps track of 3 pt. baskets and not 2 pt. baskets?

Selection.

Consider making a filter that converts a color image to true grayscale. What would the general process be?

Averaging the three color channels and then filling the pixel with that value.

A linear set of instructions designed to be completed in a set order is known as...

Sequence.

Which of the following goal is abstraction?

Simplicity.

What is a concern when you are thinking about whether or not to compress your files?

Security of the files.

As part of the lifecycle of a program, after a computer programmer writes the code, it is then compiled and most times, created into an executable file to be run on the CPU. The code that is run through the computer is known as?

Source code.

The average temperature on the planet is 59 degrees F. What can be assumed?

That the temperature on the planet can exist in a range and that temperatures on the planet are 59 degrees everywhere.

What is the primary purpose of a semicolon in many text-based programming languages?

To terminate the end of a command.

What is a risk of obtaining information through the use of crowdsourcing?

Unless independently verified, the results may be inaccurate.

A student writes the following conditional statement: if(userID>100&&userID<150). What value would make this statement true?

userID=125.

A gaming console is being programmed to ask questions, such as "Do you love computer science?", of a user when they log into the system. The programmer wants to ensure that the user answers "Yes", so he creates a loop that will re-ask the question if the user answers "No" and continues to repeat the loop until the users answers "Yes". What type of loop would the programmer likely use in this scenario?

A while loop.

Whenever you generalize a variety of related problems and develop a common solution that can be applied to solve any of them, you are using the technique called...

Abstraction.

Every task that you deal with on a day-to-day basis, no matter how large or small, requires that you perform a specific set of actions and make a particular set of decisions in very precise ways. These sets of actions and decisions are known as what?

Algorithm.

What algorithm requires both selection and iteration?

An algorithm that, when given a list of integers, displays the number of even integers in the list.

What is a good practice to prevent your password from being vulnerable to attacks?

Create your passwords based on some algorithm that helps generate a password that uses a combination of letters, numbers, and symbols.

Which Big Data analysis technique involves the examination of previously collected data sets in an attempt to discover patterns and other knowledge hidden within the data?

Data Mining.

Social media sites like Facebook, Twitter and Instagram collect large amounts of data from their users every single day. Even after a user decides to leave the social world and delete their account, the database still maintains a record of the user. This phenomenon is known to computer scientists as what?

Data persistence.

A program that Thomas has written is complete. Now he is trying to determine ways to test the program for accuracy and fix errors when he finds them. What is this procedure called?

Debugging.

Chad has written the majority of his code in Scratch and is ready to start thinking of test cases to make sure that his program functions properly, and when issues arise, fix them. This process is known as what?

Debugging.

What is the purpose of curly brackets in text-based languages?

Define an area in code for a programming structure.

The local government for a newly developed community would like to begin conducting an annual census to make an accurate count of its current population. The community is currently relatively small and consists of around 500 homes. However, it is growing quickly and expects to have more than 100,000 homes in the next few years. What is the most accurate and efficient way to perform the census?

Every year, mail a copy of the census form to every home in that community and require that each household complete the form themselves and mail it back to a central office for processing. Follow up with those who do not.

A hammer is designed to drive metal nails built from brittle glass. The hammer has a well designed handle and is easy to swing. What can be said about this design?

It is useable.

What is true about programming documentation?

It is useful to other programmers that view your code, so that they can understand what different parts of the code are intended to.

Moore's Law describes the rate at which the number of transistors on a single chip doubles over time meaning that computers are getting faster over time. What assumption can't be inferred as a direct consequence of this rate doubling?

Five years from now, web pages will require less memory than today's web pages.

What are some aspects of efficiency?

How much memory the program takes up and how long the program takes to complete a task.

Understanding the lifecycle of a program is an essential component to becoming an effective programmer. How should the lifecycle of a program work?

Idea- algorithm- write code- execute code- debug- maintain.

One of the best limitations to advancing digital communication and resources has been storage and transfer of information via cloud computing. What is a reason why cloud computing has gained users and popularity over the past 10 years?

Increased security of information.

While writing a program to regulate the speed of a self-driving car, you find that your software sometimes miscalculates the ideal car speed for city streets to be over 1500 MPH, when it should be approximately 30 MPH. What strategy would be the best to employ in debugging your program?

Insert code to display the calculation steps for speed on the screen.

What is the need for using cryptography in data communications?

It ensures data is decipherable by the recipient, but not accessible by a third party.

What is true about a low-level language?

It is less readable by humans than other languages.

Sally notices that she has the same set of 10 blocks in her code in multiple places. She decides to create a new block (procedure) in Scratch so that she can simply replace those 10 blocks with one procedure. Why would this be beneficial to Sally when she debugs and reasons through her program?

It makes the code section more abstract, so she doesn't have to think it through all 10 blocks each time she comes across them in her code.

This task shows an example of using searching and sorting techniques of big data in order to find a useful pattern.

Keeping track of all employees email use to see how many personal or work-related emails are sent during work time to check for productivity.

A popular restaurant likes to keep track of what food their patrons are ordering so that they can be better informed about what items they need to order in preparation for the next week. What would be the best way for the restaurant to organize this data with that end goal in mind?

List of what meat, veggies and fruit each customer ordered.

What type of language is optimized for machine processing and may be written and expressed as a series of binary digits, making it difficult for humans to read and write?

Low-level programming language.

Grouping several like elements together in categories is known as...

Outlier Analysis.

What type of language is used to plan out an algorithm before implementation?

Pseudocode.

A marine biologist wants to analyze the effects of scuba divers and snorkelers on coral reefs, in order to model this, he plans on writing a program to measure death and decay of the reef over time against the number of divers in the area. The intended output is a graph displaying the two variables against each other. What type of statistical analysis would be most appropriate?

Regression.

What kind of algorithm could be used to identify items on a receipt that a user purchases more than one of?

Search for lone numbers followed by a space followed by text.

Microsoft Excel is a spreadsheet program that can be used for computing the average of a list of values in cells A1 through A20 with a command such as "AVG(A1:A20)". After the user initiates this command, the command disappears and the average (or mean) of the list of numbers appears. Why is this an abstraction?

The average can be viewed without knowing the process of how the average was computed.

Samantha and her team have been asked to create a new application for their client. What is the most relevant concept they must understand.

The outcomes for specific user inputs and the layout and usage of the user interface.

What is wrong with this code? rect(200,250,100);

There is a syntax error because there is supposed to be four values.

What happens when we take unstructured data and organize it into structured data?

There is come loss of data, but the data is in a much more usable format.

What is the importance of variables in programming?

They allow you to store and change values.

What best describes high level computing languages?

They are not ambiguous.

What is an advantage of block-based programming languages compared to text-based programming languages?

They do not require the programmers to worry about syntax, capitalization, or punctuation.

What is an advantage that text-based programming languages have over block-based programming languages?

They offer programmers more detailed control over functionality when writing a program.

A programmer wishes to replace some text in a document. What must the programmer keep in mind during this process?

To not replace a word with something else in the document that is used in a different way.

Both small and big businesses can benefit from using big data in their organization. How could businesses use big data to their advantage?

Used to keep track of how well a promotional offer worked for a company and can determine if it would be worthwhile to run the promotion again. Can also be used to give the company a competitive edge by looking at data that can tell them where they are lagging behind in comparison to other companies, allowing them to make changes accordingly.

A graphic designer is hired to create a new logo for their client. They wanted to use a format that allowed the user to zoom in on the logo without affecting the quality or creating pixelization. What types of images should the graphic designer create based on the guidelines?

Vector-SVG.

What can be considered a "state" of a Scratch sprite?

Visibility and position on the screen

What causes an algorithm to loop?

When there is no reachable exit condition.

What filter can not be reversed?

Where the image is converted into black and white by moving each value closer to white or black.

When developing a program, you find a similar project that someone has created and posted online. It contains a number of elements (e.g. images, music, code segments, etc.) that you would like to integrate into your own project. Under what condition may you reuse those elements in your work?

You may only reuse elements for which the original owner has granted a license to reuse, such as the Creative Commons Share Alike license.

After conducting an online search for photos that you might use for your band's website, you find a particular photo of a funny-looking dog that you like. The photo appears on a professional photographer's website that he uses to display samples of his work. Along with the photo, the photographer has posted the following, "Attribution-No Derivatives Creative Commons License" for the work.

You may use the original photo as the background image for your band's promotional website.


Kaugnay na mga set ng pag-aaral

Chapter 30 - Medical-Surgical Disorders

View Set

Chapter 25 (30-40): Disorders of Renal Function

View Set

Chapter 27: Antipsychotics and Anxiolytics

View Set