Changes between Version 73 and Version 74 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 10:40:30 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v73 v74 298 298 good=check("Hello") # Correctly spelled word returns True 299 299 }}} 300 301 300 It would be a enormous effort to create your own spell check library, so reusing one saves a lot of time. We'll be using this when we program robots because a lot of the work we need to do to communicate with the parts of a robot has already been done. And we want to spend time making robots do things, not figuring out how to communicate with then. 302 301 303 Unfortunately, you can't include external libraries in your code in our web-based code runner and run them, so you'll have to use your imagination to see how this particular example works. You'll use them a lot in the intermediate training as the year goes on. 302 Unfortunately, you can't include external libraries in your code in our web-based code runner and run them, so you'll have to use your imagination to see how this particular example works. You'll use them a lot in the intermediate training as the year goes on. 304 303 305 304 = Final Exam = 306 [[image:https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjS5oD-gY3WAhUs94MKHbpwB4sQjRwIBw&url=http%3A%2F%2Fphi2010.blogspot.com%2F&psig=AFQjCNG8rEtQbDhBSL7ojOYD9kOuL-d0ew&ust=1504665503635530]] 307 Create a program that prints a random fortune cookie saying, drawing randomly from a different lists of nouns and verb phrases. Make it sound suitable cryptic and wise. 308 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. 309 Use functions and control structures to make the code manageable. 310 Its best if you work in pairs for this exercise. 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. 311 305 [[image:https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwjS5oD-gY3WAhUs94MKHbpwB4sQjRwIBw&url=http%3A%2F%2Fphi2010.blogspot.com%2F&psig=AFQjCNG8rEtQbDhBSL7ojOYD9kOuL-d0ew&ust=1504665503635530]] 306 307 * Create a program that prints a random fortune cookie saying, drawing randomly from a different lists of nouns and verb phrases. Make the random sayings sound suitably cryptic and wise. 308 * 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. 309 * Use functions and control structures to make the code manageable. Its best if you work in pairs for this exercise. 310 * 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. 311 312 312 313 313 314 = What's Next = 314 Well that concludes the Software Introduction. We welcome your feedback. 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 communcation with the outside world through motors, sensors and the like. 315 Well that concludes the Software Introduction. We welcome your feedback. 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 communcation with the outside world through motors, sensors and the like. 316 315 317 ---- 316 318 [[[wiki:ProgrammingReserve Programming]Archive | Programming Archive]]