Pyhton for testers, Python Interview Questions For Software Testers



Software testing - Questions and Answers - Python Interview Questions
  1. Question: How Python can be used in software testing?
    Answer:
    1. To generate test data; parse test results; generate reports; testing API calls etc.
    2. Python to extract requirements from a Word document.
    3. For testing tasks automation, setting up environments for tests, extracting performance data, etc...
    4. Testers use Python extensively in many companies with Selenium for test automation.
    5. For writing desktop applications used by testers.
    6. Test data manipulation.
    7. To build test environment
    8. Testing with IronPython on .NET
  2. Question:What Python frameworks do you know?
    Answer:Framework called Web2py, PAMIE (Python automation Module for I. E.), The py.test framework
  3. Question:What tools that helps Python development do you know?
    Answer:There are good tools for helping Python development such as Notepad++ with the PyNPP plugin and Eclipse with PyDev and PyUnit.
  4. The following is displayed by a print function call:
    yesterday
    today
    tomorrow
    Please write an example of a print function.
    Answer: print('yesterday\ntoday\ntomorrow')
  5. The following is displayed by a print function call:
    hello-how-are-you

    Please write an example of a print function.
    Answer: print('hello' + '-' + 'how' + '-' + 'are' + '-' + 'you')
  6. Question: What does the expression len('') evaluate to?
    Answer: 0
  7. Considering the following code:
    s = 'catandapple'
    Write an expression that evaluate to 'apple'.
    Answer: s[-5:]
  8. Question: Write an expression that evaluate to True
    Answer: len('aaddgg') == 6
  9. Question: Write the code that calculate the sum of even numbers from x1 till x2
  10. Question: What are "tuples"
    Answer: Tuples are immutable sequences: they cannot be modified. Tuples use parentheses instead of square brackets: tup = ('test', 5, -0.2)
  11. Question: What are the rules for legal Python names?
    Answer:
    1. Names must start with a letter or _.
    2. Names must contain only letters, digits, and _.
  12. Question: What is the dictionary tipe in Python?
    How to Access Information From Dictionaries and Modify it?
  13. To display a value in the console, what Python keyword do you use? (Print)
  14. Python file names traditionally end in what characters after a period? (.py)
  15. An if statement can have how many elif parts? (Unlimited, i.e., 0 or more)
  16. How many control objects are allowed in a frame? (Unlimited, i.e., 0 or more)
  17. When you enter text into an input field and press enter, the text is passed to the input field's event handler.
    What is the data type of the text? (string)
  18. What does the draw handler parameter represent? (The canvas)
  19. What happens if you draw text outside the canvas coordinates?
  20. You want a timer to create exactly 1000 events. Suggest any solutions.
    (Have a global counter for the number of timer calls. In the timer handler, increment the counter. In the timer handler, check the count and possibly stop the timer.)
  21. How many timers can you have running at once? (Unlimited)
  22. Give example of list - [1, 2, 3]
  23. Give example of Tuple - (1, 2, 3)
  24. Which types of data are immutable in Python? (Numbers, Tuples, Strings, Booleans)
  25. Which types of data are mutable in Python? (List)
  26. Question: What is the Lambda Functions in Python?
    Answer: Lambda Functions in Python can be used to pass a function as an argument or can be used inside another statement. A lambda function has the syntax: lambda variable(s) : expression
  27. Question: What are Decorators in Python?
    Answer:A decorator in Python is a function that wraps another function (it takes a function as an argument and returns a replacement function) Or another way to explain: The main function is called and its return value passed to the decorator and the decorator then returns a function that replaces the wrapped function.
  28. Question: What method should you use to convert a CSV file into a Dict?
    Answer: DictReader
  29. Question: If you can to create a small multiples chart, what ggplot method should you use?
    Answer: facet_wrap
  30. Question: What python module can you use to print a formatted JSON string?
    Answer: pprint
  31. Question: What Big Data platform commonly works with Parquet Files?
    Answer: Impala
  32. Question: What encoding method does GitHub use in their data api?
    Answer: base64
  33. Question: What is Python Pandas? pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.
  34. Question: What Pandas construct is similar to a database table? Answer: DataFrame
  35. Question: What Pandas function shows summary stats for a given DataFrame? Answer: describe
  36. Question: What Pandas function combines similar values for aggregation? Answer: groupby
  37. Question: What ggplot method creates simple charts using minimal inputs? Answer: qplot
  38. Question: If you can to create a small multiples chart, what ggplot method should you use? Answer: facet_wrap
  39. Question: What color library provides built-in pallettes for styling your plots in ggplot? Answer: Color Brewer
  40. Question: What is jupyter notebook? Answer: The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.
  41. Question: What is Parquet file format? Answer: Apache Parquet. Apache Parquet is a free and open-source column-oriented data store of the Apache Hadoop ecosystem. It is similar to the other columnar storage file formats available in Hadoop namely RCFile and Optimized RCFile. It is compatible with most of the data processing frameworks in the Hadoop environment.



On this page I put some Python interview questions. These Python interview questions are very simple and mainly were used for interviewing software testers who is involved in Python applications testing or grey box testing.The interview questions found above are listed in order of complexity. However all new interview questions (regardless of there difficulty) will be added to the bottom of the list. You can find more SQL interview questions searching the WEB.

END Basic Python interview questions.
Find more on Python

Interview Questions QA Main Page
© January 2012 Alex Samurin geocities.com/xtremetesting/ © eXtremeSoftwareTesting.com