# Pre-Quiz: Low-Code AI Tools

**Phase 18: Low-Code AI Tools**  
**Duration:** 15 minutes  
**Questions:** 10

---

## Instructions

This quiz assesses your baseline knowledge of low-code AI tools before starting Phase 18.

- Answer all questions
- Try to answer from memory first
- Select the best answer for each question
- Note areas where you're uncertain for focused learning

---

## Questions

### 1. What is the primary purpose of low-code ML tools?

A) To make machine learning inaccessible to non-experts  
B) To simplify ML development and deployment with minimal coding  
C) To replace traditional programming completely  
D) To make ML models less accurate but faster

<details>
<summary>Answer</summary>

**B) To simplify ML development and deployment with minimal coding**

Low-code tools democratize ML by reducing the coding required for common tasks like creating interfaces, training models, and deployment.
</details>

---

### 2. Which of the following is NOT a low-code ML interface framework?

A) Gradio  
B) Streamlit  
C) TensorFlow  
D) Hugging Face Spaces

<details>
<summary>Answer</summary>

**C) TensorFlow**

TensorFlow is a deep learning framework that requires significant coding. Gradio, Streamlit, and Hugging Face Spaces are designed for low-code interface development.
</details>

---

### 3. What does AutoML primarily automate?

A) Only data collection  
B) Model selection and hyperparameter tuning  
C) Only model deployment  
D) Writing research papers

<details>
<summary>Answer</summary>

**B) Model selection and hyperparameter tuning**

AutoML automates the process of selecting the best model architecture and tuning its hyperparameters, along with other pipeline steps like preprocessing.
</details>

---

### 4. In Gradio, what is the purpose of `gr.Interface()`?

A) To create database connections  
B) To create interactive ML demos with inputs and outputs  
C) To train machine learning models  
D) To manage user authentication

<details>
<summary>Answer</summary>

**B) To create interactive ML demos with inputs and outputs**

`gr.Interface()` is the main function in Gradio for creating simple interactive interfaces that connect input components to a function that produces outputs.
</details>

---

### 5. What is a key difference between Gradio and Streamlit?

A) Gradio is only for images, Streamlit is only for text  
B) Gradio focuses on quick ML demos, Streamlit on full data apps  
C) Gradio requires more code than Streamlit  
D) Streamlit cannot deploy to the cloud

<details>
<summary>Answer</summary>

**B) Gradio focuses on quick ML demos, Streamlit on full data apps**

While both can build interfaces, Gradio is optimized for quick ML model demos, while Streamlit is designed for comprehensive data applications and dashboards.
</details>

---

### 6. What does `share=True` do in Gradio?

A) Shares your code on GitHub  
B) Creates a public link for 72 hours  
C) Shares data with other users  
D) Enables social media integration

<details>
<summary>Answer</summary>

**B) Creates a public link for 72 hours**

The `share=True` parameter creates a temporary public URL that allows anyone to access your Gradio interface for 72 hours.
</details>

---

### 7. In Streamlit, what is `st.session_state` used for?

A) To display the current time  
B) To persist data across reruns  
C) To check server status  
D) To manage database connections

<details>
<summary>Answer</summary>

**B) To persist data across reruns**

`st.session_state` stores variables that persist across Streamlit reruns, essential for maintaining user interactions like counters or form data.
</details>

---

### 8. Which AutoML platform is known for fast training times?

A) Manual scikit-learn  
B) PyCaret  
C) FLAML  
D) Keras

<details>
<summary>Answer</summary>

**C) FLAML**

FLAML (Fast and Lightweight AutoML) is specifically designed for fast training times with efficient search algorithms.
</details>

---

### 9. What is Hugging Face Spaces primarily used for?

A) Storing large datasets only  
B) Hosting and sharing ML applications  
C) Training models exclusively  
D) Managing API keys

<details>
<summary>Answer</summary>

**B) Hosting and sharing ML applications**

Hugging Face Spaces provides free hosting for ML applications built with Gradio, Streamlit, or Docker, making it easy to share demos with the community.
</details>

---

### 10. What information is typically in a Hugging Face Space's README.md frontmatter?

A) User passwords  
B) Training data  
C) SDK type and configuration (title, emoji, sdk)  
D) Model weights

<details>
<summary>Answer</summary>

**C) SDK type and configuration (title, emoji, sdk)**

The README.md frontmatter in a Hugging Face Space contains metadata like the title, emoji, SDK type (Gradio/Streamlit), and other configuration options.
</details>

---

## Scoring

- **9-10 correct:** Excellent! You have strong baseline knowledge.
- **7-8 correct:** Good foundation. Review weak areas.
- **5-6 correct:** Some familiarity. Focus on learning the concepts.
- **0-4 correct:** New to low-code tools. Perfect time to learn!

---

## Next Steps

1. Review any questions you got wrong
2. Note topics you're uncertain about
3. Proceed to Phase 18 content
4. Retake quiz after completing the phase

---

**Ready to start learning? Let's build with low-code tools!**
