Very Easy Quiz (FYI - Grading is broken)



1. On Windows, what is the command to activate a `venv` virtual environment located in the `myenv` directory?

Please select an answer.

2. How do you mark a function as a test case for PyTest to discover?

Please select an answer.

3. What `pip` command would you use to upgrade an already installed package (e.g., `numpy`) to the latest version?

Please select an answer.

4. Which built-in function returns the number of items in a list, tuple, or string?

Please select an answer.

5. What is the command to list all packages installed in the current active virtual environment?

Please select an answer.

6. What command would you typically use with the `venv` module to create a virtual environment named `myenv`?

Please select an answer.

7. What is the command to install a package (e.g., `requests`) using `pip` within an active virtual environment?

Please select an answer.

8. How do you open a file named `data.txt` for reading in Python?

Please select an answer.

9. What is the capital of Australia?

Please select an answer.

10. What is the standard library module in Python 3 for creating virtual environments?

Please select an answer.

11. Why is it generally bad practice to install packages globally using `pip` instead of within a virtual environment?

Please select an answer.

12. What is the capital of Brazil?

Please select an answer.

13. Can you have multiple virtual environments on the same machine?

Please select an answer.

14. What keyword is used to define a function in Python?

Please select an answer.

15. On macOS/Linux, what is the command to activate a `venv` virtual environment located in the `myenv` directory?

Please select an answer.

16. What is the command to uninstall a package (e.g., `flask`) using `pip`?

Please select an answer.

17. Which data type is used to store an ordered, immutable sequence of items?

Please select an answer.

18. How do virtual environments contribute to reproducible builds?

Please select an answer.

19. What is the capital of Canada?

Please select an answer.

20. If you delete the directory containing a virtual environment, are the globally installed Python packages affected?

Please select an answer.

21. Which Selenium WebDriver method is used to locate an element by its ID attribute?

Please select an answer.

22. How do you instruct the Selenium WebDriver to wait for a certain condition (e.g., an element to be visible) before proceeding?

Please select an answer.

23. What command is typically used to run PyTest tests from the terminal?

Please select an answer.

24. What does `pip` stand for in the context of Python?

Please select an answer.

25. What is the capital of Egypt?

Please select an answer.

26. What is the output of `print(type([]))`?

Please select an answer.

27. What is the difference between a list and a dictionary in Python?

Please select an answer.

28. What is the purpose of a PyTest fixture?

Please select an answer.

29. What `pip` command is used to install all packages listed in a `requirements.txt` file?

Please select an answer.

30. What is the primary purpose of using a virtual environment in Python development?

Please select an answer.

31. How do virtual environments help manage project dependencies?

Please select an answer.

32. What `pip` command is used to generate a `requirements.txt` file from the currently installed packages in the environment?

Please select an answer.

33. How can you tell if a virtual environment is currently active in your terminal?

Please select an answer.

34. What is `conda` and how does its approach to environment management differ from `venv`/`virtualenv`?

Please select an answer.

35. Which PyTest command-line option provides more detailed output (verbosity)?

Please select an answer.

36. What is the purpose of the `if __name__ == "__main__":` block in a Python script?

Please select an answer.

37. Besides `venv`, what is another popular third-party tool for creating Python virtual environments?

Please select an answer.

38. What is the purpose of the `pyvenv.cfg` file inside a virtual environment directory?

Please select an answer.

39. What is the capital of Japan?

Please select an answer.

40. What method is used to simulate typing into an input field located by Selenium?

Please select an answer.

41. What command is used to deactivate an active virtual environment?

Please select an answer.

42. Does creating a virtual environment copy the entire Python interpreter? Explain briefly.

Please select an answer.

43. What is the standard filename used to store a list of project dependencies for `pip`?

Please select an answer.

44. How do you add a comment to a single line in Python?

Please select an answer.

45. Which method closes the current browser window controlled by Selenium WebDriver?

Please select an answer.