AIS midterm

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

Put the process for web scraping using Python in the correct order

1. Identify the URL to scrape 2. Identify the data that needs to be scraped 3. Inspect the page 4. Locate the data that needs to be extracted 5. Write/use Python code to extract the data 6. Run the code and extract the data 7. Compile structured reports/visualizations of the data

What would be the display after the following code is executed? number = 1 while(number < 4): print(number * 2) number = number + 1

2 4 6

Python 3 has been in use since

2008

In a Python program, which of the following expressions would result in False?

9 <= 8 16 == 17

Use your understanding of logical operators to help determine which of the following will result in False?

9 > 10 or 12 < 3 2 == 3 and 5 == 5

What are characteristics of selection structures in programming?

A complete understanding of relational and logical operators is crucial for creating effective selection structures. If-statements are selection structures. Computers use relational operators for making comparisons in selection structures.

When discussing logical operators, if A is True and B is False, which of the following will result in True?

A or B

Which of the following statements are true about the IDLE editor?

A program created in the editor will run in the shell. The editor works like a simple word processor, but it also allows Python to compile and run source code. To write an entire Python program, you must use the editor and not the shell.

Students in a programming class have ID numbers from 1 through 15. They are assigned to groups based on their ID numbers. What is wrong with the following code that tells students which group they will be in? if(number > 0 and number < 5): print("You're in the blue group.") elif(number > 5 and number < 10): print("You're in the green group.") elif(number >= 10 and number <= 15): print("You're in the red group.") else: print("You are not in this class")

A student with ID number 5 will not be in any group.

Which of the following are possible ways for a program to get input?

A user The Internet A file

What is the purpose of ASCII code in character comparison, as explained in the text?

ASCII code helps computers determine the alphabetical order of characters. ASCII code represents characters as numeric values.

Select the true statements about an IDE.

An IDE includes a source code editor. IDE stands for Integrated Development Environment. An IDE is a software application.

Which of the following statements are true about dual-alternative selection structures?

Another term for a dual-alternative structure is an if-else clause. Only one block of statements will be executed in a dual-alternative structure. One block of statements is executed if the condition is True, and a different block of statements is executed if the condition is False.

Web scraping is the automation of the extraction of large volumes of data from websites. Using Python, which of the following web scraping activities can be conducted?

Conduct price comparisons Collect data from social media sites Conduct research and development

According to Tableau, data-driven decision making (DDDM) uses which of the following to guide strategic business decisions that align with organizational goals, objectives, and initiatives?

Data Metrics Facts

Which of the following is Microsoft Excel frequently used for?

Data analytics Data visualization Data entry

Python has a wide array of tools and libraries specifically designed for data analysis. These assist in accomplishing which tasks?

Data visualization Data manipulation Statistical analysis

The process of data analytics includes which of the following?

Descriptive analytics Prescriptive analytics Predictive analytics

Which of the following situations would best be handled by an if-elif multiple-alternative structure?

Displaying four possible prizes based on a user's total purchase amount

Select the true statements about flowcharts.

Flowcharts are used to represent the flow of execution of a program. Flowcharts show the programmer what will happen at various branch points. A flowchart is a diagram.

Data manipulation in Python using the wide variety of libraries that are available offer accountants the ability to automate which of the following tasks?

Generate reports Perform calculations Analyze financial data

Data visualization is a strength of using Python for data analysis. Which of the following are types of data visualization that can be created using Python?

Graphics Charts Interactive plots

The Python programming language was developed in the 1980s by Blank______.

Guido van Rossum

When compared to Python, which of the following are considered limitations of using Microsoft Excel for data analysis?

Handling large volumes of data Limited scalability Syntax errors

Which of the following are true about IDLE?

IDLE is an IDE. IDLE comes packaged with a Python download. IDLE is free.

Which of the following are alternate ways to refer to a selection structure?

If-statement Conditional statement Selection construct

Which of the following are needed by every program?

Instructions A form of input A way to display results

Which of the following are true about an Integrated Development Environment?

It contains a source code editor. It translates a programmer's code into a format that is readable by a computer. It includes tools to help a programmer write correct syntax.

Which of the following statements about pseudocode are true?

Most programmers use both pseudocode and flowcharts when starting to design a program. Pseudocode is not written in a specific language.

Microsoft Excel was first introduced in 1982 as a program called ______.

Multiplan

What is the significance of nesting control structures?

Nesting control structures allows for more complex program behavior. Complex combinations of control structures are possible through nesting.

When compared to Microsoft Excel, which of the following are considered limitations of using Python for data analysis?

Not as friendly a user interface when compared to Microsoft Excel. Steep learning curve associated with learning Python for data analysis.

Which of the following Python libraries are commonly used to automate accounting tasks?

NumPy pandas

Which of the following statements are true about how numbers are processed in a computer?

Numbers and characters are treated differently in memory. It takes more space to store a floating-point number than to store an integer. The type of mathematical operations that can be performed on numeric data depends on the numbers' data types.

Select all of the following that are considered integers.

Positive whole numbers Zero Negative whole numbers

Marketing analytics are used to measure marketing performance and effectiveness and to make decisions on different strategies to increase marketing efficiency and impact. The analysis of marketing performance data can be enhanced using Python. Python is used for the analysis of which marketing related tasks?

Predictive analytics A/B Testing Customer segmentation analysis

Which of the following must be used by all programs?

Processing Output Input

The _____ is a methodology used by programmers to develop a program.

Program Development Cycle

What are the characteristics and purposes of repetition structures (loops) in computer programming?

Repetition structures involve a block of statements executed under certain conditions. The value in the test condition can change during the loop's iterations.

Which of the following Python libraries are commonly used for data processing and data visualization?

Seaborn Matpplotlib

The steps in the data project life cycle, according to Harvard University's Data Science Ready project include which three of the following?

Sensing Wrangling Collection

What type of loop ends when a specific value is entered by the user or by something in the code?

Sentinel-controlled loop

What are the three fundamental constructs that form the basis of virtually all computer programs?

Sequence, selection, and repetition

Which of the following statements are true of relational operators?

There are six relational operators. Relational operators are used to compare two values, variables, or expressions. The result of any comparison between relational operators is always either True or False.

What is the purpose of a sentinel-controlled loop?

To prompt the user for input until a sentinel value is entered To execute a block of statements repeatedly

What is the primary purpose of including comments in code?

To provide explanations for different parts of the code

Which of the following are true statements about IDLE?

To run a program created in the editor, you must first save it as a .py file. IDLE will tell you of runtime errors when you run a program. The editor highlights syntax errors as you write code.

Which of the following are ways to identify comments in Python?

Use the hashtag symbol (#). Enclose the commented line or lines between two sets of three apostrophes (' ' '). Enclose the commented line or lines between two sets of three double quotes (" " ").

Which of the following are true about variable names?

Variable names are case sensitive. Variable names cannot include spaces. Variable names may contain numbers but cannot begin with a number.

Select the true statements about the scalability of Microsoft Excel.

When large volumes of data are introduced into Microsoft Excel, issues may occur. The management of small and medium scale data sets can be accomplished relatively smoothly. As the amount of spreadsheet tabs in a workbook increases, so does potential data management issues.

Select the true statements about the scalability of Python.

When working in Python, users can save data in separate files, which allows for simultaneous work and coding. The number of columns or rows used in a data set does not impact the Python user because they are not operating in a data interface environment. Python can handle data sets of almost any scale.

A single-alternative structure consists of an if clause with a condition. If the result of the condition is True, a block of statements is executed. If the condition is False, nothing is done and the program continues to the next statement after the selection structure. Given the following code, what is the test condition? if(age >= 18): print("You are eligible to vote.") print("Goodbye")

age >= 18

ASCII code allows the computer to ______.

alphabetize

The process of investigating raw data of various types to uncover trends and correlations, and to answer specifically crafted questions is the role of data _______.

analytics

Visual Basic for _____ (VBA) is included in Excel and offers the capability to create custom macros and functions that are designed to accomplish organizational specific tasks.

applications

When you go to www.python.org to download Python, you must ______.

choose an operating system

In a(n) ______ loop, the body of the loop is executed a fixed number of times. Multiple choice question. counter

counter-controlled

The three-step data visualization process consists of exploring the data sets for pattern, then planning for visuals, and finally ___.

creating your visuals

The information technology (IT) architecture and infrastructure, software applications, programming languages, and storage technologies used for the collection, storage, analysis, and interpretation of meaningful data is referred to as the ______ ecosystem.

data

The stages of the PDLC are _____.

define, design, code, test, and revise

Trying to answer questions such as "what happened?" or "what is occurring?" or "what was the ROI?", is the role of ______.

descriptive analytics

Which symbol in a flowchart represents a decision?

diamond

Which of the following are types of repetition structures?

for loops while loops counter-controlled loops

Computers process instructions _____.

internally

In Python, a collection of related programming modules that include precompiled bundles of code that can be used repetitively in different programs and applications are referred to as a Python ______. They often contain configuration data, templates, classes, values, and documentation.

library

The ability of a computer to do a task over and over is known as a ______.

loop

The IDLE shell ______.

makes it easy to enter and test Python statements

What is the test condition in the following loop? name = "Janey" while(name != "finished"): print("Your name is ", name) name = input("Enter a name or enter 'finished': " ) print("Nice meeting ya'll.")

name != "finished"

A variable is a ______.

name for a storage location in the computer's memory

Which symbol in a flowchart represents input and output?

parallelogram

n a Python print() statement, what types of data can be displayed?

text, numbers, and variables

In order to process data, a computer program needs ______.

variables with values and instructions

A subset of data analysis that covers creating visual representations of data is referred to as data ______.

visualization

Select the true statements about ASCII code.

ASCII code is used to represent all the upper- and lowercase characters as well as digits 0 through 9. ASCII code can compare long strings of text as well as single characters. ASCII code is used for alphabetizing values in programming.

The standard representation of characters in programming is called ______.

ASCII code, which stands for American Standard Code for Information Interchange

______ use(s) short phrases to describe the outline of a program.

Pseudocode

Select the true statements about pseudocode.

Pseudocode is not written in a specific programming language. Pseudocode allows a programmer to visualize the flow of a program without getting bogged down in syntax. Pseudocode is used to outline the flow of a program.

Which of the following are popular Python IDEs?

PyCharm Spyder Visual Studio Code

Which of the following statements are true about a program that only includes sequential structures.

Sequential structures do not involve any repetition. Sequential programming prohibits all forms of branching.

What are the key characteristics of a single-alternative structure?

Statements executed when the condition is True must be indented. If the condition is True, a block of statements is executed. The condition must be enclosed in parentheses.

Which of the following Python libraries are used in marketing analytics and SEO?

TensorFlow ExPan

What is wrong with the following code? If(X > 75) : print(You have enough money) Else: print(You need more money to buy this item.)

Text to be displayed in print() statements is not enclosed in quotes. Statements inside the if and else clauses should be indented. The keywords if and else must be lowercase.

What causes an infinite loop?

The initial condition is met but never changes.

Which are the values that can be included in the range() function?

The starting value The stop value The step value

In a for loop, which parts of the loop are defined in a single statement?

The test condition The increment or decrement of the test condition The initial condition

What is wrong with the following code that calculates the cost of an item with tax? tax = 0.06 cost = float(input("How much does your item cost? ")) while(cost != 0): new_cost = cost + (cost * tax) print("Total cost is $ ", new_cost) print("Goodbye")

The value of cost never changes so this will be an infinite loop.

Select the true statements about connectivity in Microsoft Excel.

Workbooks can be connected to external data sources including SQL servers. Microsoft Excel is a solid option for users importing and exporting basic reports. Connections to cloud-based data is possible.

In Microsoft Excel, a statement written by a user that is designed for a specific calculation is referred to as a ______.

formula

A computer is content to process programming instructions internally, but output is needed by ______.

humans

In Python, a prompt takes the form of a(n) ___________.

input request

API stands for Application Programming _____ and allows for different software programs the ability to connect and work with each other.

interface

Python is ______ software based on community-based development that runs optimally on Windows and Linux operating systems.

open-source

The Python ______ statement is used to display data to a screen.

print()

The work done by a computer program is called _____.

processing

Computers use ______ to make comparisons.

relational operators

Microsoft Excel is a spreadsheet software application that consists of a grid interface of columns and ______ where data can be entered, structured, and manipulated.

rows

A _____ structure has no branch points.

sequential

There are ______ basic arithmetic operations that can be performed on numeric data.

six

One way to visualize a data ecosystem is to apply it to the data project life cycle. The Data Science Ready project outlines the five steps of the data project life cycle. The final stage in this life cycle is ______.

storage

In the following program, which line is the processing line?

sum = num_1 + num_2


Kaugnay na mga set ng pag-aaral

abdominal aortic aneurysm practice questions

View Set

History Social Impact of the Industrial revolution

View Set

Congenital Heart Disease in Children

View Set

Google Analytics study questions

View Set