Introduction to Python Programming Quiz Assignment
Introduction to Python Programming Quiz Assignment
Assignment
Total points 20/20
.py
.pt
.pyt
.python
2name
name2
@name
name-2
3. What is the data type of True in Python? * 1/1
string
int
bool
float
func
define
function
def
6. What is the output of print(type("5"))? * 1/1
int
str
float
bool
3.33
3.0
include
import
require
using
9. What will len("Python") return? * 1/1
Error
list = {1, 2, 3}
list = [1, 2, 3]
list = (1, 2, 3)
for i in range(5):
foreach i in range(5):
loop i in range(5):
try-except
do-catch
throw-catch
try-catch
[0, 1, 2, 3, 4]
[1, 2, 3, 4, 5]
[5, 4, 3, 2, 1]
[0, 1, 2, 3, 4, 5]
15. What will be the output of the following code? * 1/1
x = [1, 2, 3]
print(x[1])
Error
Blue print
distraction
instance
none
18. Which of the following makes a function impure? * 1/1
Using return
Using parameters
19. What is the default mode in which a file is opened using open()? * 1/1
'r' (read)
'w' (write)
'a' (append)
20. What will happen if you try to open a non-existing file in 'r' mode? * 1/1
Appends content
Raises a FileNotFoundError
This content is neither created nor endorsed by Google. - Contact form owner - Terms of Service - Privacy Policy
Forms