Write the output of the following code:
def myfunc():
a=7
print(a, end = '')
return
a = 9print(a , end = '' )
myfunc()
print(a , end = '' )
Give this one a try later!
979
Which of the following data types are mutable? Please select all that apply.
lists
Booleans
, strings
dictionaries
integers
tuples
Give this one a try later!
lists, dictionaries
Functions can only return a single thing (but that thing can be a tuple) (T/F)
Give this one a try later!
True
Which of the following is the correct way to open a file in Python?
A. myfile = open("filename.txt", 'w')
B. with open("mydata.dat", 'r+') as myfile:
C. In Captain Jean-Luc Picard's voice: Computer, open file "StarTrekIsAwesome.csv"
D. Both A and B
Give this one a try later!
D. Both A and B
What is the output of the following code?
myint = 2024
mylist = [1, 2, 3]
mytuple = (mylist, myint)
def myfunc():
a=7
print(a, end = '')
return
a = 9print(a , end = '' )
myfunc()
print(a , end = '' )
Give this one a try later!
979
Which of the following data types are mutable? Please select all that apply.
lists
Booleans
, strings
dictionaries
integers
tuples
Give this one a try later!
lists, dictionaries
Functions can only return a single thing (but that thing can be a tuple) (T/F)
Give this one a try later!
True
Which of the following is the correct way to open a file in Python?
A. myfile = open("filename.txt", 'w')
B. with open("mydata.dat", 'r+') as myfile:
C. In Captain Jean-Luc Picard's voice: Computer, open file "StarTrekIsAwesome.csv"
D. Both A and B
Give this one a try later!
D. Both A and B
What is the output of the following code?
myint = 2024
mylist = [1, 2, 3]
mytuple = (mylist, myint)