Chapter 2- Elementary Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the scope of a variable?

A

It is the part of the program where the variable can be referenced

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the simultaneous assignment syntax that is supported by python?

A

var1, var2…,varn=exp1, exp2,…expn

This tells python to evaluate all the expressions on the right and assign them corresponding variable on the left simultaneously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly