Variables

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following are valid Python variables names: Note: No keywords, begins with a digit and characters that is not a letter, digit, or underscore

Age, route66, home_address

In Python, a variable must be declared before it it assigned a value:

False

Which of the following style does PEP8 recommend for multi-word variables names:

Snakecase

You are reading Python code, and these statements appear scattered in different locations throughout the code: employeenumber = 4398 EmployeeNumber = 4398 employeeNumber = 4398

These statements refer to different variables

In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type:

True

Which of the following are Python reserved words (keywords):

class, and, None

What Python built-in function returns the unique number assigned to an object:

id( )

Consider the following sequence of statements: n = 300 m = n Following execution of these statements, Python has created how many objects and how many references?

one object, two references

Which of the following statements assigns the value 100 to the variable x in Python:

x = 100


Set pelajaran terkait

Practice Problems for Chapter 34 and 35

View Set

CINF 100X: Quiz 1 Information Literacy Topics

View Set

Quiz Bowl Literature Practice (writers)

View Set

The Point: Chapter 24 Musculoskeletal

View Set

Signal Transduction I: Ion channel-linked receptors & GPCRs

View Set

Fin 3403 Chapter 10 Conceptual Questions

View Set

Ch 53 PrepU Assessment of Kidney & Urinary Fxn

View Set