Difference between revisions of "User:Praveer-mathur-9f3d@uni-bonn.de/python-on-hpc"

From HPC Wiki
Jump to navigation Jump to search
Line 55: Line 55:
 
- Neither of them
 
- Neither of them
 
|| Explanation: Wrong
 
|| Explanation: Wrong
 +
</quiz>
 +
{{hidden end}}
 +
 +
{{hidden begin
 +
|title = "Tightly integrated with its own virtual environment feature"
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
- Pip
 +
|| Explanation: Wrong
 +
+ Conda
 +
|| Explanation: Correct
 +
- Both of them
 +
|| Explanation: Wrong
 +
- Neither of them
 +
|| Explanation: Wrong
 +
</quiz>
 +
{{hidden end}}
 +
 +
{{hidden begin
 +
|title = "Built-in third-party package repositories"
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
- Pip
 +
|| Explanation: Wrong
 +
+ Conda
 +
|| Explanation: Correct
 +
- Both of them
 +
|| Explanation: Wrong
 +
- Neither of them
 +
|| Explanation: Wrong
 +
</quiz>
 +
{{hidden end}}
 +
 +
{{hidden begin
 +
|title = "Installs new Python executable into env by default"
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
- Pip
 +
|| Explanation: Wrong
 +
+ Conda
 +
|| Explanation: Wrong
 +
- Both of them
 +
|| Explanation: Wrong
 +
+ Neither of them
 +
|| Explanation: Correct
 +
</quiz>
 +
{{hidden end}}
 +
 +
{{hidden begin
 +
|title = "Automatically installs dependencies for requested package"
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
- Pip
 +
|| Explanation: Wrong
 +
- Conda
 +
|| Explanation: Wrong
 +
+ Both of them
 +
|| Explanation: Correct
 +
- Neither of them
 +
|| Explanation: Wrong
 +
</quiz>
 +
{{hidden end}}
 +
 +
{{hidden begin
 +
|title = "Requires you to specify package version"
 +
}}
 +
<quiz display=simple>
 +
{
 +
|type="()"}
 +
- Pip
 +
|| Explanation: Wrong
 +
- Conda
 +
|| Explanation: Wrong
 +
- Both of them
 +
|| Explanation: Wrong
 +
+ Neither of them
 +
|| Explanation: Correct
 
</quiz>
 
</quiz>
 
{{hidden end}}
 
{{hidden end}}

Revision as of 13:49, 17 March 2026

Short Quiz: Python Packages

Which of these locations will Python search for packages by default?

Anything that is in $PYTHONPATH
Anything in your home
Preconfigured Site Packages
The current working directory

Short Quiz: Virtual Environments

Which of the following statements is true?

venv comes with Python
Virtual environments always go to ~/.virtualenvs
Each virtual env always has its own Python instance
The activate script has to be source-d to activate the venv
The deactivate script has to be source-d to deactivate the venv

Short Quiz: Conda vs. Pip

To which package manager do the statements apply? pip, conda, neither or both?

"Non-Python packages available by default"

Pip
Conda
Both of them
Neither of them

"Tightly integrated with its own virtual environment feature"

Pip
Conda
Both of them
Neither of them

"Built-in third-party package repositories"

Pip
Conda
Both of them
Neither of them

"Installs new Python executable into env by default"

Syntax error

Pip
Conda
Both of them
Neither of them

"Automatically installs dependencies for requested package"

Pip
Conda
Both of them
Neither of them

"Requires you to specify package version"

Pip
Conda
Both of them
Neither of them