Details

Adventures in Python


Adventures in Python


Adventures in ... 1. Aufl.

von: Craig Richardson

15,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 21.01.2015
ISBN/EAN: 9781118951842
Sprache: englisch
Anzahl Seiten: 288

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<b>The complete beginner's guide to Python, for young people who want to start today</b> <p><i>Adventures in Python</i> is designed for 11-to 15-year olds who want to teach themselves Python programming, but don't know where to start. Even if you have no programming experience at all, this easy to follow format and clear, simple instruction will get you up and running quickly. The book walks you through nine projects that teach you the fundamentals of programming in general, and Python in particular, gradually building your skills until you have the confidence and ability to tackle your own projects. Video clips accompany each chapter to provide even more detailed explanation of important concepts, so you feel supported every step of the way.</p> <p>Python is one of the top programming languages worldwide, with an install base in the millions. It's a favourite language at Google, YouTube, the BBC, and Spotify, and is the primary programming language for the Raspberry Pi. As an open-source language, Python is freely downloadable, with extensive libraries readily available, making it an ideal entry into programming for the beginner. <i>Adventures in Python</i> helps you get started, giving you the foundation you need to follow your curiosity.</p> <ul> <li>Start learning Python at its most basic level</li> <li>Learn where to acquire Python and how to set it up</li> <li>Understand Python syntax and interpretation for module programming</li> <li>Develop the skills that apply to any programming language</li> </ul> <p>Python programming skills are invaluable, and developing proficiency gives you a head start in learning other languages like C++, Objective-C, and Java. When learning feels like fun, you won't ever want to stop – so get started today with <i>Adventures in Python</i>.</p>
<p>Introduction 1</p> <p><b>Adventure 1</b></p> <p><b>Diving into Python 23</b></p> <p>What Is Programming? 24</p> <p>Opening IDLE 25</p> <p>Returning to Your First Python Program 26</p> <p>It Isn’t Working—Grrr! 28</p> <p>Using a File Editor 30</p> <p>Asking Questions with Variables 33</p> <p>A Bit About Variables 35</p> <p>Using Variables for a Fill-in-the-Blanks Story 37</p> <p>Making the Program Make Decisions: Conditionals 39</p> <p>Using if Statements 39</p> <p>Nested if Statements 41</p> <p>Creating an Imaginary Vending Machine 43</p> <p>Repeating Code with Loops 45</p> <p>Using while Loops 45</p> <p>Infinite while Loops 47</p> <p>Praise Generator 48</p> <p>A Bigger Adventure: Spaceship Control Console 50</p> <p>Set-Up and Password 50</p> <p>Using the Console to Do Things 52</p> <p><b>Adventure 2</b></p> <p><b>Drawing with Turtle Graphics 57</b></p> <p>Getting Started with Turtle 57</p> <p>Using Variables to Change Angles and Lengths 61</p> <p>Using Addition to Draw a Spiral 64</p> <p>Saving Some Space with Loops 65</p> <p>A Shape with 360 Sides: Drawing a Circle 67</p> <p>Controlling the Number of Sides Using for Loops 68</p> <p>Changing the Fill Colour in a Shape 71</p> <p>Creating Functions to Reuse Your Code 72</p> <p>Shape Presets 75</p> <p>Adding Randomly Generated Pictures 76</p> <p><b>Adventure 3</b></p> <p><b>Windows, Buttons, and Other GUI Stuff 83</b></p> <p>Creating Buttons 84</p> <p>Changing the Button Text on Click 87</p> <p>Counting Clicks 88</p> <p>Creating Text Boxes 90</p> <p>Writing It Backwards 92</p> <p>Adding Passwords 93</p> <p>Building a Random Sentence Generator 96</p> <p>Programming a Guessing Game 99</p> <p><b>Adventure 4</b></p> <p><b>More GUI Elements with Tkinter 105</b></p> <p>Creating Sliders 105</p> <p>How Colours Work on Computers and as Hexadecimal Values 109</p> <p>Changing the Canvas Colour 111</p> <p>Making the Colour Picker 113</p> <p>Adding a Text Box 116</p> <p>Creating a Click Speed Game 117</p> <p><b>Adventure 5</b></p> <p><b>Drawing Shapes with PyGame 123</b></p> <p>Installing PyGame 123</p> <p>My First PyGame 124</p> <p>Creating Rectangles 127</p> <p>Creating a Rectangle 127</p> <p>A Rainbow of Rectangles 128</p> <p>Colour Grid 131</p> <p>Creating Ellipses 133</p> <p>Wobbling Circle 133</p> <p>Saving Your Images 135</p> <p>Saving a Single Image 135</p> <p>Saving a Series of Images 136</p> <p><b>Adventure 6</b></p> <p><b>Adding Keyboard Input with PyGame 139</b></p> <p>Using Keyboard Input 140</p> <p>Other Keys You Can Use 142</p> <p>Creating the Game 142</p> <p>Introducing Full Movement 146</p> <p>Moving the Player Offscreen 148</p> <p>Adding the Ball 150</p> <p>Creating Collisions 152</p> <p>Goal! 154</p> <p>Adding a Time Limit 157</p> <p><b>Adventure 7</b></p> <p><b>Creative Ways to Use a Mouse with PyGame 161</b></p> <p>Getting the Mouse Position 161</p> <p>Making a Button 163</p> <p>Moving Target 166</p> <p>Exploding Clicks 169</p> <p>Making a Mesh 172</p> <p>Creating Mouse Trails 175</p> <p><b>Adventure 8</b></p> <p><b>Using Images with PyGame 181</b></p> <p>Loading an Image 181</p> <p>Layering Images 184</p> <p>Randomly Layering Images 186</p> <p>Adding a Moustache to a Photograph 188</p> <p>Making Sprites 191</p> <p>Creating a Walking Animation 191</p> <p>Walking in All Directions 195</p> <p>Teleportation 197</p> <p><b>Adventure 9</b></p> <p><b>Using Sounds and Music with PyGame 203</b></p> <p>Playing Sounds 203</p> <p>Creating a Noise Loop 205</p> <p>Making Keyboard Sound Effects 207</p> <p>Using Music with Python 210</p> <p>Playing Music 210</p> <p>Adding Volume Tremolo 212</p> <p>Making a Music Player 215</p> <p>Adding Sounds and Music to a Game 218</p> <p><b>Adventure 10</b></p> <p><b>Your Really Big Adventure 223</b></p> <p>Writing the Program for the Game 224</p> <p>Setting Up the Files 224</p> <p>Making the Game 225</p> <p>Walls 226</p> <p>Doors, Collisions and Coins 229</p> <p>Setting Up the Window and Variables 231</p> <p>Adding the Game Loop 234</p> <p>Character Controls and Animations 234</p> <p>Player Collisions and Collecting Coins 237</p> <p>Displaying Points and Updating the Window 237</p> <p>Playing the Game 238</p> <p>Debugging the Game 239</p> <p>Summary 240</p> <p><b>Appendix A</b></p> <p><b>Installing and Downloading the Proper Files 243</b></p> <p>Installing PyGame 243</p> <p>Windows 8 243</p> <p>Windows 7 245</p> <p>Mac 245</p> <p>Linux (Ubuntu) 247</p> <p>Raspberry Pi 248</p> <p>Downloading the Files for Adventures 8, 9 and 10 248</p> <p>Windows 8 248</p> <p>Windows 7 249</p> <p>Mac 249</p> <p>Linux (Ubuntu) 250</p> <p>Raspberry Pi 250</p> <p>Glossary 251</p> <p>Index 257</p>
<p><b>Craig Richardson</b> is a software developer, freelance writer, and former teacher with plenty of classroom experience. In his spare time, he has introduced hundreds of beginners to programming through his fun and engaging Python workshops and resources.</p>
<p>Ready to learn Python programming? This is the place to start!</p> <p>Python is one of the top programming languages worldwide, a favourite of Google, YouTube, the BBC, and Spotify, as well as the primary programming language for the Raspberry Pi. Learning Python is a great way to get into programming, and this book makes it easy and fun.</p> <p>No programming experience? No problem! <i>Adventures in Python</i> walks you through ten projects that explain the fundamentals of programming in general, and Python in particular, with clear, simple instructions. As you master the basics, new skills are introduced. Video clips with each chapter provide more information about important concepts. Before you know it, you'll have the confidence to tackle your own projects. Some of the things you'll learn are:</p> <ul> <li>Navigate basic computer programming concepts</li> <li>Learn the fundamentals of Python through fun and engaging examples</li> <li>Understand the Python programming language so that you can make your own ideas come to life</li> <li>Create your own images, animations, and GUIs with the power of programming</li> <li>Create a fun two-player game to play with your friends</li> </ul> <p>To make your Python adventure even easier, the companion website at www.wiley.com/go/adventuresinpython includes helpful videos for each chapter and other useful information. Once you know how to use Python, you'll also have a head start on learning other programming languages, such as C++, Objective-C, and Java. Let's get started!</p>

Diese Produkte könnten Sie auch interessieren:

AP Chemistry For Dummies
AP Chemistry For Dummies
von: Peter J. Mikulecky, Michelle Rose Gilman, Kate Brutlag
PDF ebook
19,99 €
LSAT Logic Games For Dummies
LSAT Logic Games For Dummies
von: Mark Zegarelli
PDF ebook
18,99 €
Catholic High School Entrance Exams For Dummies
Catholic High School Entrance Exams For Dummies
von: Lisa Zimmer Hatch, Scott A. Hatch
PDF ebook
12,99 €