Practice MCQs

Filter by course context, attempt questions, and get an instant score report.

Computer Science and Entrepreneurship Python Programming Python Modules and Built-in Data Structures Medium

Q1. What does add(3, 5) return if def add(a,b): return a + b?

Computer Science and Entrepreneurship Python Programming Python Modules and Built-in Data Structures Medium

Q2. Which keyword is used to define a function in Python?

Computer Science and Entrepreneurship Python Programming Python Modules and Built-in Data Structures Medium

Q3. What is a Python module?

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q4. What is the output of the provided nested conditional code? temperature, humidity, wind_speed = 25, 60, 15 print("Hot" if temperature > 30 and humidity > 50 else "Warm" if temperature == 25 and wind_speed > 10 else "Cool" if temperature < 20 and humidity < 30 else "Moderate")

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q5. What does the range() function do in Python?

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q6. Which loop type is used to iterate over a collection such as lists?

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q7. Purpose of range() function?

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q8. Correct syntax for for loop?

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q9. Which loop runs while condition is true?

Computer Science and Entrepreneurship Python Programming Control Structures Medium

Q10. What is loop used for?

Showing 31 to 40 of 151 results
Page 4 of 16