3.06 Segment One Exam

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

High-level programming languages are used to write a wide variety of programs, like operating systems, scientific modeling, and general applications.

True.

In Python, programmers use square brackets and an index range to slice multiple characters from a string.

True.

In Python, while loops will repeat during the time the test condition is true.

True.

Logical errors mean the program ran, but the results were not as expected.

True.

Low-level programming languages are used to write code to control the computer's hardware.

True.

Read the following code: # distance equals the square root of X squared plus Y squareddistance = sqrt((pow (x, 2) + pow y, 2) There is an error in the code. How should the code be revised in order to get the correct output?

distance = sqrt(pow(x, 2) + pow(y, 2))

Read the following code used to calculate the number of buses needed for a field trip: students = input("How many students are attending the field trip?")bus = 30totalBuses = students / busThere is an error in the code. Which additional function needs to be used with the input() function?

int().

Which of the following is the proper way to assign a string literal value to a variable in Python?

variableName = "value"

What is the most effective way to document version control and change management?

Detailed notes.

In Python, when converting a string value into a numeric value that contains a decimal, the int()function is used.

False.

What is one task related to program maintenance?

Making design and functionality improvements,

What is one way interpreted programming languages differ from compiled programming languages?

Programs written with interpreted languages require the original source code, but programs written with compiled languages can be shared with others while keeping the source code private.

Which of the following numeric values is considered a floating point number?

1.6

Read the following code: for count in range(80);leo.forward(count * 2)leo.left(count + 2)There is an error in the for loop. What should be fixed?

Change the semicolon to a colon after the statement.

Read the following code: x = 1while(x < 50);print(x)x = x + 1There is an error in the while loop. What should be fixed?

Change the semicolon to a colon at the end of the statement.

What is one way programmers benefit from using Python's Math Module?

Create programs faster and easier.

Natalia is using the software development life cycle to create a program that will calculate a user's fitness level. She has defined her project goals, created a requirements document, and analyzed the scope of the work. What should she do next?

Design the program by writing pseudocode.

What is one way programmers notify users of program updates?

Email messages.

Jessica and Roberto are using the software development life cycle to develop a career interest app. They defined their project goal and have created a requirements document. What else should they do as part of the planning and analysis step?

Evaluate the scope of the project

What is one benefit of using Python's Turtle Graphics Module?

Importing pre-written code to draw on the screen makes a programmer's job faster and more efficient.

___ require less memory than ___ because they are positive and negative whole numbers.

Integers, floating points.

Which of the following is an example of a syntax error in programming?

Not using quotation marks and parentheses to print a string literal.

In programming, what is a string within quotation marks called?

String literal.

What is the purpose of indexing?

To pull out one specific character from a string.

How does the waterfall method of software development differ from the agile method?

Waterfall project teams work on one step of the development at a time, while agile teams develop smaller portions of the entire project in small sprints.

When is the most appropriate time to use a for loop in Python?

When the exact number of repetitions needed for the loop is known.

When is the most appropriate time to use a while loop in Python?

When the exact number of repetitions needed for the loop is unknown.

Peter's team has been hired to rapidly develop a program using Python. What is a potential drawback to rapidly developing a program?

Without proper planning or testing, programs created quickly could have many errors.


Kaugnay na mga set ng pag-aaral

Fundamental Information Security Chapter 13: Information Systems Security Education and Training

View Set

Ch. 34 Acute Kidney Injury and Chronic Kidney Disease

View Set

Ch. 64: Assessment of reproductive function

View Set

AP Statistics Semester 2 Quiz/Checkpoint Questions

View Set

Saunders NCLEX Comprehensive Review Study Questions

View Set

Configuring Windows Devices 70-697 (Learn Mode - Written Answers)

View Set