Skip to content

Commit b3136ad

Browse files
authored
Update README.md
1 parent a98538d commit b3136ad

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,73 @@ Dynamic Typing Is Everywhere
173173

174174

175175
- Capgemini
176+
1. What will be the output of the code below in Python 2? Explain your answer.
177+
178+
def div1(x,y):
179+
180+
print "%s/%s = %s" % (x, y, x/y)
181+
182+
def div2(x,y):
183+
184+
print "%s//%s = %s" % (x, y, x//y)
185+
186+
div1(5,2)
187+
188+
div1(5.,2)
189+
190+
div2(5,2)
191+
192+
div2(5.,2.)
193+
194+
Also, how would the answer differ in Python 3 (assuming, of course, that the above [print] statements were converted to Python 3 syntax)?
195+
196+
2. What are the key differences between Python 2 and 3?
197+
198+
3. What are some alternative implementations to CPython? When and why might you use them?
199+
200+
4. How does Python's garbage collection work?
201+
202+
5. What is the difference between range and xrange? How has this changed over time?
203+
204+
6. Here's a function (Provide a function). Optimize it for me.
205+
206+
7. What will be the output of the code below?
207+
208+
List = [‘a’, ‘b’, ‘c’, ‘d’, ‘e’]
209+
210+
print list [10:]
211+
212+
8. How does the GIL impact concurrency in Python? What kinds of applications does it impact more than others?
213+
214+
9. How do you iterate over a list and pull element indices at the same time?
215+
216+
10. How do you enforce ordering for a dictionary-style object?
217+
218+
11. How many ways can you append or concatenate strings? Which of these ways is fastest? Easiest to read?
219+
220+
12. What is PYTHONSTARTUP and how is it used?
221+
222+
13. Write a code for downloading a CSV in Python2 and Python3. (Provide a link to CSV file)
223+
224+
14. I'm getting a maximum recursion depth error for a function. What does this mean? How can I mitigate the problem?
225+
226+
15. Here's a class hierarchy with some methods defined. When I call this function, what gets printed?
227+
228+
Apart from these technical questions, ask these following general questions to find out more about candidates Python skills
229+
230+
16. What’s your favorite standard library module?
231+
232+
17. Tell me something you don't like about Python.
233+
234+
18. What was the most interesting project you have participated in? Can you describe it and tell why you consider it to be so interesting?
235+
236+
19. Do you like to participate in the analysis, design and deployment phases of a project or do you prefer to concentrate on the pure development of well-described task? Why?
237+
238+
20. I have noticed you listed Skill X on your CV. What’s your opinion about it?
239+
240+
21. Do you remember any programming project decision you made that was a failure? Why do you think it was a mistake? Why did it happen? What did you learn from this experience?
241+
242+
176243
#### What is a method?
177244

178245
A method is a function on some object x that you normally call as x.name(arguments...). Methods are defined as functions inside the class definition: class C: def meth (self, arg): return arg*2 + self.attribute.

0 commit comments

Comments
 (0)