Which Python command is an example of conditional logic?

IT Exam Items RepositoryCategory: IoT Connecting ThingsWhich Python command is an example of conditional logic?

Which Python command is an example of conditional logic?

  • def
  • delay
  • if
  • from

Explanation: The commands if and else are used for conditional logic. The commands for and while are used for repetition logic, and from is for module importing.

Related exam: IoT Connecting Things 2.0 – Chapter 3 Quiz Answers