print "Game Over!"
print "Game Over!"
print "Game Over!"
print "7 + 3 = " , 7 + 3
print "7 - 3 = " , 7 - 3
print "7 * 3 = " , 7 * 3
print "7 / 3 = " , 7 / 3
print "7.0 / 3.0 = " , 7.0 / 3.0
print "7 % 3 = " , 7 % 3
print "7 + 3 * 5 = " , 7 + 3 * 5
print "(7 + 3) * 5 = " , (7 + 3) * 5
score = 0;
distance = 1200.76;
playAgain = 'y'
shieldsUp = True;
lives = 3;
aliensKilled = 10;
engineTemp = 6572.89;
print "\nscore: " , score
print "distance: " , distance
print "playAgain: " , playAgain
#skipping shieldsUp since you dont generally print Boolean values
print "lives: " , lives
print "aliensKilled: " , aliensKilled
print "engineTemp: " , engineTemp
print "\nHow much fuel? ",
fuel = 5 # raw_input()
print "fuel: " , fuel
bonus = 10;
print "\nbonus: " , bonus
score = 5000;
print "score: " , score
#altering the value of a variable
score = score + 100;
print "score: " , score
#combined assignment operator
score += 100;
print "score: " , score
# increment operators
lives = 3;
lives += 1
print "lives: ", lives
lives = 3;
lives += 1
print "lives: ", lives
lives = 3;
lives += 1
bonus = lives * 10;
print "lives, bonus = " , lives , ", " , bonus
lives = 3;
bonus = lives * 10;
lives += 1
print "lives, bonus = " , lives , ", " , bonus
#integer wrap around
score = 4294967295;
print "\nscore: " , score
score += 1
print "score: ", score
ALIEN_POINTS = 150;
aliensKilled = 10;
score = aliensKilled * ALIEN_POINTS;
print "score: " , score
NOVICE = 0
EASY = 1
NORMAL =2
HARD=3
UNBEATABLE=4
myDifficulty = EASY;
FIGHTER_COST = 25
BOMBER_COST=26
CRUISER_COST = 50
myShipCost = BOMBER_COST;
print "\nTo upgrade my ship to a Cruiser will cost" , (CRUISER_COST - myShipCost) , " Resource Points.\n";
GOLD_PIECES = 900;
print "Welcome to Lost Fortune\n\n";
print "Please enter the following for your personalized adventure\n";
print "Enter a number: ";
adventurers = 10 # int(raw_input())
print "Enter a number, smaller than the first: ";
killed = 5 #int(raw_input())
survivors = adventurers - killed;
print "Enter your last name: ";
leader = 'xyz' #raw_input()
#tell the story
print "\nA brave group of " , adventurers , " set out on a quest ";
print "- in search of the lost treasure of the Ancient Dwarves. ";
print "The group was led by that legendary rogue, " , leader , ".\n";
print "\nAlong the way, a band of marauding ogres ambushed the party. ";
print "All fought bravely under the command of " , leader,
print ", and the ogres were defeated, but at a cost. ",
print "Of the adventurers, " , killed , " were vanquished, ",
print "leaving just " , survivors , " in the group.\n"
print "\nThe party was about to give up all hope. ";
print "But while laying the deceased to rest, ";
print "they stumbled upon the buried fortune. ";
print "So the adventurers split " , GOLD_PIECES , " gold pieces." ,
print leader , " held on to the extra " , (GOLD_PIECES % survivors),
print " pieces to keep things fair of course.\n"