assert in solidity
assert is used to check the contract's code for errors and make sure code runs like it's supposed to. Usually by testing certain invariants (an invariant is a condition that should always be true at a certain stage in the code). These are the cases when…