Changes between Version 19 and Version 20 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 5:25:21 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v19 v20 63 63 else: 64 64 print("Go away, we're out eating tacos\n") 65 print("Hope you had a good time \n")65 print("Hope you had a good time") 66 66 }}} 67 This program uses a IF-THEN-ELSE statement to tell the computer to make a decision in your program, and you'll do itall the time. ''Go [https://www.tutorialspoint.com/execute_python3_online.php here] and run the code above.'' It should print:67 This program uses a IF-THEN-ELSE statement to tell the computer to make a decision in your program, and you'll use them all the time. ''Go [https://www.tutorialspoint.com/execute_python3_online.php here] and run the code above.'' It should print: 68 68 69 69 {{{ … … 74 74 Our ours are 11:00am-11:52am 75 75 76 Hope you had a good time 77 76 Hope you had a good time 78 77 }}} 79 78 … … 90 89 {{{ 91 90 medianSalary=98260 #Median annual salary of a software engineer in the US 92 salary= 10000091 salary=90000 93 92 if salary > medianSalary: 94 93 print("Whohoo! Dinner's on you!") 95 94 }}} 96 " 95 96 ''Go [https://www.tutorialspoint.com/execute_python3_online.php here] and run the code above.'' It should print: 97 98 {{{ 99 }}} 100 101 Yep, nothing was output. Nada. In this case, we used variables which were numbers, and a greater-than expression to compare them. Since the condition was ''False'', nothing was printed. 97 102 98 103