// if without else double ponyPrice = 1299.99 double funds = prompt("How much money do you have?") if (ponyPrice <= funds) { print("buying a pony") funds = funds - ponyPrice } print("I now have $" + funds) ---------------------------- double ponyPrice = 1299.99 double funds = prompt("How much money do you have?") if (ponyPrice <= funds) { print("buying a pony") funds = funds - ponyPrice } else { print("No Pony Today :-<") } print("I now have $" + funds) ---------------------------- // assume we have a module that can tell us this boolean notRaining = weather() if (notRaining) { print("pool appointment today") } else { ... --or------------------------ String raining = prompt("Is it raining?") if (raining == "no") then goToPool() // module that knows how to do this } ---------------------------- double money = checkBankBalance() if (money > 100) { print("I'M RICH!!!") } ---------------------------- String pieOnSale = prompt("Is pie on sale today?") if (pieOnSale == "yes") { print("buy pie") } else { print("buy cake") } --or------------------------ const double MAX_PIE_PRICE = 12.99 double piePrice = prompt("How much is pie today?") if (piePrice < MAX_PIE_PRICE) { buyPie() // module that knows how to do this } else { buyCake() // module that knows how to do this } ---------------------------- double funds = prompt("How much money do you have?") double price = prompt("What is the price?") string buyOrSell = prompt("Buy or sell?") if (buyOrSell == "BUY") { funds = funds - price } else { funds = funds + price } -----------------------------