-
-
Save grenade/aaee942da0363fa31e12 to your computer and use it in GitHub Desktop.
To complete the questionnaire, first fork it (to your own Github account), then simply edit each file to include your answers.
Please avoid just copy/pasting your answers from the internet, we're well aware of the common answers out there. We're interested in your own answers and reasoning and your ability to demonstrate in-depth understanding r…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| What are Python decorators and how would you use them? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How would you set up multiple python projects on the same computer using different python versions (and third party library versions) for each project? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Demonstrate two ways of fetching every 3rd item in a list. Complete the code example below: | |
| list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] | |
| # print every third letter (method 1): | |
| # print every third letter (method 2): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # What is the difference between lists and tuples? | |
| # Write a short explanation here: | |
| # Demonstrate an example of tuple usage (with a good use case for tuples over lists): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # What is the difference between range and xrange? | |
| # Write a short explanation here: | |
| # Use 'range' to print the first 5 letters of the alphabet. Complete the code example below: | |
| list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # What is the 'with' construct used for? | |
| # Write a short explanation here: | |
| # Demonstrate use of the with construct in an example of your choice: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Demonstrate two ways of determining if 'needle' occurs in 'haystack': | |
| needle = 'jump' | |
| haystack = 'The quick brown fox jumps over the lazy dog.' | |
| # (method 1. The 'Pythonic' way): | |
| # (method 2. 'Conventional' way): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Is Python pass-by-value or pass-by-reference? Explain your reasoning: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Convert the following code to a list comprehension: | |
| squares = [] | |
| for x in range(10): | |
| squares.append(x**2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment