--- a/testing-debugging/questions.rst Thu Nov 11 23:44:59 2010 +0530
+++ b/testing-debugging/questions.rst Fri Nov 12 02:01:28 2010 +0530
@@ -3,20 +3,49 @@
.. A mininum of 8 questions here (along with answers)
-1. Question 1
+1. Why do we do Software Testing?
+
+ Answer: To evaluate a program and determine that it meets required results.
+
+
- Answer: Answer 1
+
+2. What is proper indentation for python code according to style guidelines?
+
+ Answer: Four Space Indentation
- OR
+3. What is the idiom used for running python scripts in a standalone manner?
- Answer::
+ 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.
+
- answer code line 1
- answer code line 2
- answer code line 3
-2. Question 2
-3. Question 3
+
Larger Questions
@@ -24,5 +53,8 @@
.. A minimum of 2 questions here (along with answers)
-1. Question 1
-2. Question 2
+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.
+
+