Changes between Version 92 and Version 93 of ControlSystems/SoftwareTeam/IntroToPython


Ignore:
Timestamp:
Sep 4, 2017, 11:13:41 PM (8 years ago)
Author:
cdelgigante
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/IntroToPython

    v92 v93  
    1010Hang on, it gets harder from here.
    1111
     12We'll be starting with a programming language called [https://www.python.org/ Python], specifically Python 3.  There are a lot of programming languages.  Some are created because they're better for solving certain problems, others because people are bored and want to try something new.  Python has been around for a while, and its pretty popular because its easy to use.  The team uses Java to control the robot but that language is a little trickier.  We'll get to that one later once you get a handle on the basics.
     13
    1214{{{
    1315#!html
    1416<p style="color:blue;">
    15 (A quick note:  If you know all this already and are getting bored...CONGRATULATIONS!  Here's '''[https://www.youtube.com/watch?v=x94yTpv0T1k some cute corgi puppy videos]''' as your reward. Then, come back and dive into a later section. This is all self-paced.   Regardless, I recommend you do this set of lessons if you haven't programmed in Python 3 before because we build on it later and you'll be lost.  If you have programmed in Python 3 before, you can just skip to the Final Exam at the end, show your stuff, and help your teammates.)
     17(A quick note:  If you know all this already and are getting bored...CONGRATULATIONS!  Here's [https://www.youtube.com/watch?v=x94yTpv0T1k|some cute corgi puppy videos] as your reward. Then, come back and dive into a later section--this is all self-paced.   Regardless, we recommend you do this set of lessons if you haven't programmed in Python 3 before because we build on it later and you'll be lost.  If you have programmed in Python 3 before, you can just skip to the Final Exam at the end, show your stuff, and help out your teammates.)
    1618</p>
    1719}}}
    18 
    19 We'll be starting with a programming language called [https://www.python.org/ Python], specifically Python 3.  There are a lot of programming languages.  Some are created because they're better for solving certain problems, others because people are bored and want to try something new.  Python has been around for a while, and its pretty popular because its easy to use.  The team uses Java to control the robot but that language is a little trickier.  We'll get to that one later once you get a handle on the basics.
    2020
    2121Python, like every programming language, has a structure.  Here are the big parts:
     
    311311= Final Exam =
    312312[[Image(1B6AA343-B7D4-49F7-88DA-2AB89A7A4E72-5482-00000452F115F905_tmp.png,left,10%,margin=5)]]
    313 {{{
    314 #!html
    315 <ul>
    316 <li>Feeling like you got this?  Awesome, then:  <bold>Create a program that prints random fortune cookie sayings.</bold></li>
    317 <li>Randomly build the sayings from at least three different lists of nouns and verb phrases.  Make the random sayings sound suitably cryptic and wise.</li>
    318 <li>The program should prompt the user for the number of sayings they want output, validate that it is indeed a number, and print out that many</li>
    319 <li>Use functions and control structures to make the code manageable. Its best if you work in pairs for this exercise.</li>
    320 <li>If you need help, refer to this lesson, the [[https://docs.python.org/3/index.html | Official Python 3 Documentation]], and don't hesitate to ask the mentors.</li>
    321 </ul>
    322 }}}
     313Feeling like you got this?  Awesome, then:  ''Create a program that prints random fortune cookie sayings.''
    323314[[br]]
     315Randomly build the sayings from at least three different lists of nouns and verb phrases.  Make the random sayings sound suitably cryptic and wise.</li>
    324316[[br]]
     317The program should prompt the user for the number of sayings they want output, validate that it is indeed a number, and print out that many</li>
    325318[[br]]
     319Use functions and control structures to make the code manageable. Its best if you work in pairs for this exercise.</li>
    326320[[br]]
    327 [[br]]
    328 [[br]]
    329 
    330 = What's Next =
    331 Well, that concludes the Software Introduction.  We welcome your feedback. 
     321If you need help, refer to this lesson, the [[https://docs.python.org/3/index.html | Official Python 3 Documentation]], and don't hesitate to ask the mentors.</li>
     322 
     323= What's Next: =
     324Well, that concludes the Software Programming Introduction.  We welcome your feedback. 
    332325
    333326Software takes a lot of work and study to write well, and this is just a taste.  For those of you who select the Software team, we'll begin intermediate training with the Raspberry Pi, and show you how to write programs that use external libraries to communcate with the outside world through motors, sensors and the like.  Then we'll introduce you to the RoboRio, the competition robotics platform. '''