Computer Science and Entrepreneurship Python Programming Testing and debugging in Python Medium Q1. Which module is used for unit testing in Python? Unit test PDB OS JSON
Computer Science and Entrepreneurship Python Programming Testing and debugging in Python Medium Q2. What is the purpose of unit testing in Python? Test small code parts Check code Ensure user expectations Prevent code breakage
Computer Science and Entrepreneurship Python Programming Modular Programming in Python Medium Q3. How does modular programming benefit teams? Faster execution Independent work Smaller files More functions
Computer Science and Entrepreneurship Python Programming Modular Programming in Python Medium Q4. Why use the main function? To organize code To shorten code To compile code To create errors
Computer Science and Entrepreneurship Python Programming Modular Programming in Python Medium Q5. What is the main function used for in Python? Error handling Start point Data input Import modules
Computer Science and Entrepreneurship Python Programming Modular Programming in Python Medium Q6. What does modular programming improve? Speed Reusability Complexity Memory
Computer Science and Entrepreneurship Python Programming Built-in Data Structures Medium Q7. Which keyword is used to define a function in Python? define function def func
Computer Science and Entrepreneurship Python Programming Built-in Data Structures Medium Q8. Which operation is used to combine two lists? combine() concat() + merge()
Computer Science and Entrepreneurship Python Programming Built-in Data Structures Medium Q9. What does my_list[-2:] return if my_list = [10,20,30,40,50]? [10,20] [40,50] [30,40] [50,60]
Computer Science and Entrepreneurship Python Programming Built-in Data Structures Medium Q10. Which correctly slices from index 7 to the end? s(7:) s[7:] s{7:} s[:7]