> For the complete documentation index, see [llms.txt](https://simsimbutdifferent.gitbook.io/prompt_web3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simsimbutdifferent.gitbook.io/prompt_web3/lesson-4/lesson-4-assignments-and-exercises.md).

# Lesson 4: Assignments & Exercises

## **Assignments and Practical Exercises**

### **Assignment 1**:

* Write a brief essay explaining the differences between `require`, `revert`, and `assert`, and provide scenarios where each is appropriate.

### **Exercise 1**:

* Create a smart contract implementing a simple banking system with functions for deposit and withdrawal. Use `require` statements for validating conditions.

### **Exercise 2**:

* Modify the above contract to include events for each deposit and withdrawal action. Test the contract to ensure that events are emitted correctly.

***

This lesson will help you understand how to make your smart contracts more reliable and informative through proper error handling and the use of events. These concepts are essential for creating robust and user-friendly smart contracts. Once you've completed this lesson, you'll have a deeper understanding of how to manage errors and provide feedback to users and front-end applications.
