Tracking Variables
var1 = 9
var2 = 7
var3 = 2
#var1 = var1 + 5
#var2 = var1 - var3
#var1 = var2
#var3 = (var1 + var2)/2
#var2 = 6
print(var1)
print(var2)
print(var3)
Hacks (HW):
Problem 1: What is the final outcome of the algorithm below?
valueA <-- 4 valueB <-- 90 valueC <-- 17 valueB <-- valueC - valueA valueA <-- valueA * 10 if valueB > 10: print(valueC)
Problem 2: What is the final outcome of the algorithm below?
type <-- "curly" color <-- "brown" length <-- "short" type <-- "straight" hair <-- type + color + length print(hair)