Q5 PYTHON MULTIPLE CHOICE
Code Example 4-1
def get_username(first, last):
s = first + "." + last
return s.lower()
def main():
first_name = input("Enter your first name: ")
last_name = input("Enter your last name: ")
username = get_username(first_name, last_name)
print("Your username is: " + username)
main()
A. Refer toCode Example 4-1: What is the scope of the variable nameds ?
a.
global
b.
local
c.
global in main() but local in get_username()
d.
local in main() but global in get_username()
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here