1. In the following function definition, whatdo we call ‘.3f’? (Careful!)
def show_cube_root(x):
ans = x ** (1.0/3.0)
print(‘The cube root of ‘ +format(x, ‘.3f’) + ‘ is ‘
+ format(ans, ‘.3f’) + ‘.’)
a format specifier
an argument
a literal string
all of the above
none of the above
My answer is a format specifier
2.The following statement includes a functioncall. Inside the parentheses of the function call, what do wecall(bill + tip) and 2?
total = round((bill + tip), 2)
global variables
arguments
literal values
a keyword
My answer is literal values
3.In the following function definition, what dowe call ans?
def show_cube_root(x):
ans = x ** (1.0/3.0)
print(‘The cube root of ‘ +format(x,
OR
OR