Changes between Version 92 and Version 93 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 11:13:41 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v92 v93 10 10 Hang on, it gets harder from here. 11 11 12 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. 13 12 14 {{{ 13 15 #!html 14 16 <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 helpyour 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.) 16 18 </p> 17 19 }}} 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.20 20 21 21 Python, like every programming language, has a structure. Here are the big parts: … … 311 311 = Final Exam = 312 312 [[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 }}} 313 Feeling like you got this? Awesome, then: ''Create a program that prints random fortune cookie sayings.'' 323 314 [[br]] 315 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> 324 316 [[br]] 317 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> 325 318 [[br]] 319 Use functions and control structures to make the code manageable. Its best if you work in pairs for this exercise.</li> 326 320 [[br]] 327 [[br]] 328 [[br]] 329 330 = What's Next = 331 Well, that concludes the Software Introduction. We welcome your feedback. 321 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> 322 323 = What's Next: = 324 Well, that concludes the Software Programming Introduction. We welcome your feedback. 332 325 333 326 Software 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. '''