Python Control Flow
💡
Exercise 13

pH Levels 15 XP Easy

Ctrl+Enter Run Ctrl+S Save

The pH scale measures how acidic or basic a substance is, ranging from 0 to 14:

  • **0-6**: Acidic
  • **7**: Neutral
  • **8-14**: Basic

We can use if/elif/else to classify a pH value.

📋 Instructions
Create a variable `ph` set to `7`. Write a program that prints: - `'Acidic'` if pH is less than 7 - `'Neutral'` if pH is exactly 7 - `'Basic'` if pH is greater than 7 Expected output: ``` Neutral ```
Use if ph < 7, elif ph == 7, else for the three cases. You've got this — take it step by step!
🧪 Test Cases
Input
Run your code
Expected
Neutral
Expected program output
main.py
Hi! I'm Rex 👋
Output
Ready. Press ▶ Run or Ctrl+Enter.