Skip to content

Instantly share code, notes, and snippets.

function getUserChoice() {
userInput = prompt("enter your choice? ");
userInput = userInput.toLowerCase();
if (userInput === 'rock' || userInput === 'paper' || userInput === 'scissors') {
return userInput;
} else if (userInput === 'bomb') {
console.log('you won!');
} else {
console.log('Error!');
}
class BankAccount(object):
balance = 0
def __init__(self, name):
self.name = name
def __repr__(self):
return "%s's account. Balance: $%.2f" % (self.name, self.balance)
def show_balance(self):
print "Balance: $%.2f" % (self.balance)
def deposit(self, amount):