Bird
0
0

Which Python statement correctly imports the Flask module needed to create a web interface for GPIO control?

easy📝 Syntax Q3 of 15
Raspberry Pi - Web Server and API
Which Python statement correctly imports the Flask module needed to create a web interface for GPIO control?
Aimport flask
Bimport Flask from flask
Cfrom Flask import flask
Dfrom flask import Flask
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct Python import syntax for Flask

    The correct syntax to import the Flask class is 'from flask import Flask'.
  2. Step 2: Identify incorrect options

    Options with wrong case or order cause syntax errors.
  3. Final Answer:

    from flask import Flask -> Option D
  4. Quick Check:

    Correct import syntax = C [OK]
Quick Trick: Use 'from flask import Flask' to import Flask class [OK]
Common Mistakes:
MISTAKES
  • Using wrong case for Flask or flask
  • Incorrect import order
  • Confusing module and class names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Raspberry Pi Quizzes