Practice Functions - 11.9 | 11. Python Programming | CBSE Class 11th AI (Artificial Intelligence)
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What is the keyword used to define a function in Python?

💡 Hint: Think of how you say you are defining something in Python.

Question 2

Easy

Write a simple function add(a, b) that adds two numbers.

💡 Hint: Use the return keyword to send back a value.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What is the purpose of a function in Python?

  • To define a variable
  • To create reusable code
  • To take user input

💡 Hint: Think about how functions can help avoid writing the same code twice.

Question 2

True or False: A function can return more than one value.

  • True
  • False

💡 Hint: Consider using a tuple when you need to return multiple results.

Solve 3 more questions and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a function is_prime(num) that checks if a number is prime. Return True if it is, and False otherwise.

💡 Hint: Consider how prime numbers are defined.

Question 2

Create a function fibonacci(n) that returns a list of the first n Fibonacci numbers.

💡 Hint: Recall how the Fibonacci sequence works.

Challenge and get performance evaluation