Discover millions of audiobooks, ebooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

Learn Coding Basics in Hours with Python
Learn Coding Basics in Hours with Python
Learn Coding Basics in Hours with Python
Ebook180 pages1 hour

Learn Coding Basics in Hours with Python

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Newly updated for 2021! Want to learn how to code in less than a day? This book was designed for absolute beginners - you don't need any prior experience or knowledge. Written by the Co-Founders of The Tech Academy (learncodinganywhere.com), this book serves as a perfect introduction to computer programming for anyone. This book utilizes Python,

LanguageEnglish
Release dateNov 17, 2017
ISBN9798348499051
Learn Coding Basics in Hours with Python

Read more from Jack C. Stanely

Related authors

Related to Learn Coding Basics in Hours with Python

Related ebooks

Computers For You

View More

Reviews for Learn Coding Basics in Hours with Python

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Learn Coding Basics in Hours with Python - Jack C. Stanely

    Chapter Eleven: Coding Tips, 49

    Installation, 49

    Chapter Twelve: Writing Python Code, 50

    Variables, 50

    Math, 51

    Chapter Thirteen: Data Types, 53

    Python Data Types, 54

    Tab Key, 55

    Boolean, 57

    Double Equal Signs, 61

    Commenting Code, 61

    Modules, 62

    Scripts, 62

    If Statements, 63

    Indentation, 63

    Strings, 64

    Lists, 64

    Tuples, 65

    Dates, 65

    Concatenating a String, 66

    Functions, 66

    Using What We’ve Learned Thus Far, 67

    Build Your Own, 68

    End of Chapter Quiz, 68

    Chapter Fourteen: Statements, 69

    Not Equal To (!=), 69

    Greater Than or Equal To (>=), 69

    Less Than or Equal To (<=), 70

    Testing Variables, 70

    Assignment, 70

    Another If Statement, 70

    Else Statements, 71

    Elif Statements, 71

    Exercise, 72

    Counter, 72

    Time.Sleep(), 73

    Loops, 73

    Lists, 74

    Changing Lists, 75

    Lists and Loops, 76

    Numbers and Lists, 76

    Dictionaries, 77

    © Prosper Consulting Inc., The Tech Academy 6

    Functions, 79

    String Function, 81

    Float Function, 81

    Length Function, 82

    Integer Function, 82

    Round Function, 82

    Delete, 83

    Using What We’ve Learned Thus Far, 83

    End of Chapter Quiz, 85

    Chapter Fi een: Build Your Own, 86

    Modules, 86

    Create Modules, 87

    Input, 87

    Program, 88

    Python Exercise 1, 92

    Python Exercise 2, 93

    End of Chapter Quiz, 93

    Chapter Sixteen: Challenges , 94

    Python Challenge 1, 94

    Python Challenge 2, 94

    Python Challenge 3, 94

    Chapter Seventeen: Rock, Paper, Scissors Game, 97

    End of Chapter Challenge, 98

    Chapter Eighteen: Hangman Game, 99

    End of Chapter Challenge, 100

    Chapter Nineteen: Tic-Tac-Toe Game, 101

    End of Chapter Challenge, 102

    Chapter Twenty: Text-Based Adventure, 103

    End of Chapter Challenge, 105

    Chapter Twenty One: Congratulations!!, 106

    Index, 107

    Free Intro to Coding Class, 110

    Other Reading, 111

    © Prosper Consulting Inc., The Tech Academy 7

    CHAPTER ONE

    WELCOME

    Welcome to our Learn Coding Basics in Hours with Python book!

    Now, we’re sure you want to dive right into coding but there’s some information we are going to cover first to ensure you are well prepared. In fact, you won’t write any code until the 13th chapter of this book.

    It may seem like a lot of reading before we get down to business but it’s worth it. Let’s compare this to another subject: how hard would it be to drive a car if you couldn’t define the important terms – such as steering wheel, gas pedal or brake pedal? So, please bear with us and take some time learning some fundamental data that will set you up well for the adventure that lies ahead.

    We have attempted to define all technical terms used in this book but if you come across any that you don’t understand, look these up in The Tech Academy’s Technology Basics Dictionary (available for purchase on Amazon).

    The Tech Academy is a technology school headquartered in Portland, Oregon, with multiple campuses around the world. We specialize in coding boot camps (intensive training programs aimed at preparing graduates for entry-level technology positions, that can be completed in a few months). We also offer custom training for companies, and have published several books.

    While we would love to tell you everything about computers and technology in this book, we are only going to cover the absolutely necessary data. If you are interested in learning about how computers work exactly, we recommend reading our book You Are Not Stupid – Computers and Tech Simplified, which can be purchased on Amazon.

    Our educational philosophy is to assume no prior knowledge on the part of the student. What this means is that our training content, including this book, is written for absolute beginners. We operate on the assumption that you’ve never written code before and that you don’t know basic technical terms – this ensures nothing is over your head and that you aren’t lost while reading.

    You’re about to experience The Tech Academy’s approach to education first hand: we are going to start our book by defining the technical words used in the title of our book!

    CODING

    Coding refers to the action of entering instructions into computers to make them perform specified actions. A computer is a special type of machine.

    © Prosper Consulting Inc., The Tech Academy 8

    Machines are devices (equipment with a purpose; tools) made by humans to get work done. They are usually made out of durable materials like wood, plastic and metal. Normally they have some parts that move and some parts that don’t; sometimes they have no moving parts at all. They receive some kind of energy that they use to do their work.

    One of the traits that makes people different from animals is their ability to create complex machines.

    Usually people create machines because there is some work they want to do that the machine could help them with. The help the machine provides could be to get the work done faster, to do the work with less chance of errors, or to do the work nearly continuously, without the need to stop for food or sleep. There are other reasons people make machines, but it usually comes down to getting more work done in a given amount of time with fewer errors.

    As time goes on, machines o en get improved or changed to make them more effective or to respond to changes in the area of society where they are used.

    Cars, planes, telephones and ovens are all machines.

    Again, a computer is just another machine – it’s a device made by people to get work done.

    Let’s take a closer look at computers.

    © Prosper Consulting Inc., The Tech Academy 9

    CHAPTER TWO

    COMPUTERS

    Computers were created to do a simple thing: they take in data (information), change the data in some way, and send out data. That’s all.

    There are certain truths regarding computers:

    1. They are only machines. They are not people.

    2. They were created by people and can only act if a person tells them to. Even

    then, they can only perform actions that a person thought of ahead of time and

    built into them.

    Computers do not have a soul. They cannot think. Everything ever done by a computer was predetermined by humans. Even so-called artificial intelligence (computer systems that are able to perform actions that require human intelligence, like being able to recognize sounds and images), or computers that can learn, only have these abilities because we designed them that way.

    As machines, some of the characteristics of computers include the following:

    Enjoying the preview?
    Page 1 of 1