Difference between revisions of "User:Praveer-mathur-9f3d@uni-bonn.de/python-on-hpc"
Jump to navigation
Jump to search
| Line 139: | Line 139: | ||
|| Explanation: Wrong | || Explanation: Wrong | ||
+ Neither of them | + Neither of them | ||
| + | || Explanation: Correct | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | === Short Quiz: Arrays and Performance === <!--T:5--> | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = What should you always do before you optimize your code's performance? (Hard to implement). | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + Click and submit to see the answer | ||
| + | || Measure your code's performance! | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | === Short Quiz: Array Memory Layout === <!--T:5--> | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = Which index varies fastest in a row-major layout, which varies fastest in a | ||
| + | column-major layout? (Hard to implement). | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + Click and submit to see the answer | ||
| + | || Row-major: last index, column-major: first index | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = Which ordering do NumPy arrays have by default? More than one answer | ||
| + | may be correct. | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="[]"} | ||
| + | + C order | ||
| + | || Explanation: Correct | ||
| + | - Fortran order | ||
| + | || Explanation: Wrong | ||
| + | - Column-major | ||
| + | || Explanation: Wrong | ||
| + | + Row-major | ||
|| Explanation: Correct | || Explanation: Correct | ||
</quiz> | </quiz> | ||
{{hidden end}} | {{hidden end}} | ||
Revision as of 14:02, 17 March 2026
Short Quiz: Python Packages
Which of these locations will Python search for packages by default?
Short Quiz: Virtual Environments
Which of the following statements is true?
Short Quiz: Conda vs. Pip
To which package manager do the statements apply? pip, conda, neither or both?
"Non-Python packages available by default"
"Tightly integrated with its own virtual environment feature"
"Built-in third-party package repositories"
"Installs new Python executable into env by default"
"Automatically installs dependencies for requested package"
"Requires you to specify package version"
Short Quiz: Arrays and Performance
What should you always do before you optimize your code's performance? (Hard to implement).
Short Quiz: Array Memory Layout
Which index varies fastest in a row-major layout, which varies fastest in a
column-major layout? (Hard to implement).
Which ordering do NumPy arrays have by default? More than one answer
may be correct.