Week 17 Kahoot - RobertVogue/Wk17Kahoot GitHub Wiki

1. What gets printed with the following code?

1 (2,3) {'age':21}


2. Which command will correctly ask the user for their age?

age = input('How old are you?')


3. What will the code evaluate to...?

{1:4, 2:5. 3:6}


4. What will the code evaluate to...?

{'banana'}


5. What will the code evaluate to...?

True


6. What will the code evaluate to...?

3.0


7. What is the result of print('5' + '3')?

'53'


8. What will the code evaluate to...?

[9, 16, 25]


9. What is the result of print(5/2)?

2.5


10. What does it mean that a dictionary is a mappable collection?

Elements are referenced with a hashable value.


11. What will the code evaluate to...?

True


12. Who invented Python?

Guido Van Rossum


13. What will the code evaluate to...?

[0, 1, 4, 9, 16]


14. What makes sets different from other data structures?

Each element is unique


15. What will the code evaluate to...?

'orange'


16. What is the result of print(int('42.0'))?

ValueError


17. What two parameters does the built-in function filter() take??

filter(function, iterable)


18. What will the code evaluate to...?

2


19. What values will be included in this range?

10, -40, -70


20. What will the code evaluate to...?

[90, 91, 99, 90]


21. What decorator would you use on a class method?

@property


22. What is the result of print(5//2)?

2


23. What keywords can be used in an if statement?

if, elif, else


24. What will the code evaluate to...?

{2:4, 4:16, 6:36}