Simple Blockchain Transaction Approval
📖 Scenario: You are building a simple blockchain transaction approval system. Each transaction has an amount, and you want to approve or reject it based on a limit.
🎯 Goal: Build a program that checks if a transaction amount is within the allowed limit using if-else statements and prints whether the transaction is approved or rejected.
📋 What You'll Learn
Create a variable called
transaction_amount with the value 150.Create a variable called
approval_limit with the value 200.Use an
if-else statement to check if transaction_amount is less than or equal to approval_limit.Print
"Transaction approved" if the condition is true, otherwise print "Transaction rejected".💡 Why This Matters
🌍 Real World
Blockchain systems often need to approve or reject transactions based on rules like limits or balances.
💼 Career
Understanding if-else statements is essential for writing smart contracts and blockchain transaction logic.
Progress0 / 4 steps