type(7.0)
type("7.0")
type(7)
float(7)
str(7.0)
type(3+4)
float
argument to the int
function, which of the following does it do?
Which of the following does not print the same thing as the others?
Program A:
Program B:
Program C:
Program D:
Consider the following program:
After this program executes, what values do a
and b
hold?
What does the following program print?
Suppose that you are writing a program and you have two variables x
and y
that contain values. You’d like to swap the values stored in those variables, so what was previously stored in x
is now stored in y
and what was stored in y
is now in x
. For example if the following program is completed with your code, it should output 4 10
. Note: your solution should not depend on the specific values (e.g., 4 and 10) - it should work regardless of what x
and y
are set to.