Objective Questions
-------------------
.. A mininum of 8 questions here (along with answers)
1. Why do we do Software Testing?
Answer: To evaluate a program and determine that it meets required results.
2. What is proper indentation for python code according to style guidelines?
Answer: Four Space Indentation
3. What is the idiom used for running python scripts in a standalone manner?
Answer:
if __name__ == '__main__':
4. What constitutes a test case?
Answer: A set of inputs and expected result
5. How do you start the debugger on ipython?
Answer: %debug
6. What idiom do you use for catching and exception?
Answer: try,catch.
7. What kind of exception is 0/0?
Answer Zero Division Error
8. a = 12.68
b = 0.05
c = round(a/b)
d = c * b
What would you recommend to the programmer who wrote
above written piece of code.
Larger Questions
----------------
.. A minimum of 2 questions here (along with answers)
1. Write a program for checking if two numbers are coprime
Create test cases for it and automate it.
2. Write a program that divides two numbers. Take the numbers from the user. Also make sure the code tell the user that input is invalid incase the divisor is 0.