Home > Python > Quizzes > Python Test
Python Test
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “Syntax to automatically close files?”
Python Test
Time left 00:00
25 Questions

1. In list_name:

2. Syntax to check if a file is open

3. A shortcut for range(0 - 5)

4. List.remove("loser")

5. Syntax to build a list of even numbers from 1 to 6

6. Syntax to automatically close files?

7. If len(usertextvariable) > 0:

8. Syntax to open a file

9. 2 (remainders not shown with integers - quotient rounded down)

10. Mylist.append(4)

11. Listname[3:] access which indices in a list slice?

12. Command to break up a sentence into words

13. Continuation character- continues to next line

14. Def. functional programming

15. Dictionary = {'a' : 1 - "key2" : 2}

16. Syntax to read and print 1 line at a time

17. What are the 2 arguments the filter() function takes?

18. Syntax to cast values as strings in a file.write command

19. Yes

20. Syntax to prompt user for a number

21. Books.sort()

22. Syntax to create an instance

23. Change types

24. Usertextvariable.isalpha()

25. Syntax to define a lambda function