Python Week 1

¡Supera tus tareas y exámenes ahora con Quizwiz!

False

The Python programming language was so named after a snake was discovered in the creator's office.

True.

The Python shell has an integrated help system.

True

The Python shell is great for exploring Python language features.

False

The assignment operator has higher precedence than the arithmetic operators.

Integrated Development Environment (IDE)

Thonny is best described as which of the following?

A window in which Python statements and expressions are executed immediately.

What is the Python shell?

Ready SetGo

What output does the following code produce? print('Ready', end=' ') print('Set', end='') print('Go')

apple banana

What output does the following code produce? print('apple', 'banana')

False

A Python program must be enclosed in curly braces { } to be executed.

True

Thonny has a package manager that lets you install and update external Python packages.

1stPlace because an identifier cannot begin with a digit.

Which of the following is NOT a valid Python identifier?

The print statement is a call to a function

Which of the following statements is true?

False

Python 3 is backwards compatible to Python 2.

Procedural programming, object-oriented programming, and functional programming

Python embodies elements of which programming paradigm?

False

In dynamically typed languages, variables are declared to store a specific type of data.

True

Python is a general-purpose programming language, appropriate for solving problems in many areas of computing.

True

Python variables are created using an assignment statement.

False

Running a program that contains errors will cause the Thonny development environment to terminate.

True

Thonny displays code using syntax highlighting.

The difference between uppercase and lowercase letters matters

What does the term case sensitive mean?

Showing certain elements of program code in different colors

What is syntax coloring?

total_value because a variable name should use lowercase letters and an underscore to separate words.

Which of the following identifiers follows the convention for naming Python variables?

Guido van Rossum

Who developed the Python programming language?

False

In Python, the assignment statement is also an expression.

False

The value assigned to a variable must be numeric.

Jan-Feb-Mar

What output is produced by the following code? print('Jan', 'Feb', 'Mar', sep='-')

oak#elm#pine!

What output is produced by the following code? print('oak', 'elm', 'pine', end='!', sep='#')

45

What output is produced by the following code? print(15 + 30)

Readability counts, beautiful is better than ugly, explicit is better than implicit, complex is better than complicated, simple is better than complex

Which of the following is a principle embraced by the Python programming language?

True

You can store a value in a variable in the Python shell.

False

You must use a print statement to display the result of an expression in the Python shell.

False

Python variables that represent integers are NOT object reference variables.

True

The output of a Python program run in Thonny appears in the shell window.

True

The value assigned to a variable could be a floating point number.

True

The value of a variable can change throughout a program.

8

What value is assigned to the variable num by the following statement if the current value of num is 4? num = num * 2

False

A Python program must compiled into an executable form before it can be run.


Conjuntos de estudio relacionados

POPLHLTH 206 L9 - Nutrition in Infancy

View Set

Romanticism, Victorianism, and Modernism Test

View Set

week 3 Sherpath: Female Reproductive System

View Set

Chapter 48: Caring for Clients with Ostomies

View Set

Grade 10 - Chemistry - Atomic Structure Basic

View Set