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

  • (A) function
  • (B) def
  • (C) fun
  • (D) define
πŸ’¬ Discuss
βœ… Correct Answer: (B) def
Explanation: In Python, the `def` keyword is used to define a function. Example: `def my_function():`
Explanation by: Rati Dubey
In Python, the `def` keyword is used to define a function. Example: `def my_function():`

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
77
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
92%
Success Rate