File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 99favorite_person = input ("Who is your favorite person? " )
1010
1111# Display output
12- print (favorite_person + " bought you " + favorite_food + " and " + favorite_drink + "." )
12+ print (
13+ favorite_person
14+ + " bought you "
15+ + favorite_food
16+ + " and "
17+ + favorite_drink
18+ + "."
19+ )
Original file line number Diff line number Diff line change 1111# or
1212was_computer_bought = True
1313was_bike_bought = False
14- print ("Was a computer or bike bought? " + str (was_computer_bought or was_bike_bought ))
14+ print (
15+ "Was a computer or bike bought? "
16+ + str (was_computer_bought or was_bike_bought )
17+ )
1518
1619# not
1720is_raining = False
Original file line number Diff line number Diff line change 1919
2020CENTS_PER_DOLLAR = 100
2121
22- num_cents = int (float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR )
22+ num_cents = int (
23+ float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR
24+ )
2325
2426# What do you do next? Write code here
Original file line number Diff line number Diff line change 2323CENTS_PER_NICKEL = 5
2424
2525# prompt user for dollars and convert it to cents
26- num_cents = int (float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR )
26+ num_cents = int (
27+ float (input ("How many dollars do you have: $" )) * CENTS_PER_DOLLAR
28+ )
2729
2830# calculate change and display it
2931dollars = num_cents // CENTS_PER_DOLLAR
You can’t perform that action at this time.
0 commit comments