SEP- AIA

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5

PART B

PROGRAM B1 PROGRAM B2 PROGRAM B3 PROGRAM B4 PROGRAM B5 . . .

3

 
  
 
  # 3. Python Program to Simulate a Vacuum Cleaner

### Program

```python
# Vacuum Cleaner Simulation

status = input("Enter the status (dirty/clean): ")

if status.lower() == "dirty":
    print("Cleaning...")
elif status.lower() == "clean":
    print("Moving...")
else:
    print("Invalid status!")
```

### Sample Output 1

```text
Enter the status (dirty/clean): dirty
Cleaning...
```

### Sample Output 2

```text
Enter the status (dirty/clean): clean
Moving...
```

### Explanation

* The variable `status` represents the current state of the environment.
* If `status` is **"dirty"**, the vacuum cleaner performs the **Cleaning** action.
* If `status` is **"clean"**, the vacuum cleaner performs the **Moving** action.
* `if-else` statements are used to select the appropriate action based on the current state.