Changes between Version 19 and Version 20 of ControlSystems/SoftwareTeam/IntroToPython


Ignore:
Timestamp:
Sep 4, 2017, 5:25:21 PM (8 years ago)
Author:
cdelgigante
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/IntroToPython

    v19 v20  
    6363else:
    6464   print("Go away, we're out eating tacos\n")
    65 print("Hope you had a good time\n")
     65print("Hope you had a good time")
    6666}}}
    67 This program uses a IF-THEN-ELSE statement to tell the computer to make a decision in your program, and you'll do it all the time.  ''Go [https://www.tutorialspoint.com/execute_python3_online.php here] and run the code above.''  It should print:
     67This 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:
    6868
    6969{{{
     
    7474Our ours are 11:00am-11:52am
    7575                                                                                                                                                                                                                         
    76 Hope you had a good time 
    77                                                                                                                                                                                                                                 
     76Hope you had a good time                                                                                                                                                                                                                               
    7877}}}
    7978
     
    9089{{{
    9190medianSalary=98260 #Median annual salary of a software engineer in the US
    92 salary=100000
     91salary=90000
    9392if salary > medianSalary:
    9493   print("Whohoo! Dinner's on you!")
    9594}}}
    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
     101Yep, 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.
    97102
    98103