Learn Coding Basics in Hours with Python
By Jack C. Stanely and Erik Gross
()
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,
Read more from Jack C. Stanely
You Are Not Stupid: Computers and Technology Simplified Rating: 0 out of 5 stars0 ratingsThe Project Management Handbook: Simplified Agile, Scrum and Devops for BeginnersSim: Tech and computers simplified Rating: 0 out of 5 stars0 ratingsLearn Coding Basics for Kids, Young Adults and People who are Young at Heart, with Python Rating: 0 out of 5 stars0 ratings
Related to Learn Coding Basics in Hours with Python
Related ebooks
Learn Coding Basics in Hours with Small Basic Rating: 0 out of 5 stars0 ratingsTechnology: Cool Women Who Code Rating: 4 out of 5 stars4/5Fundamentals of Programming: Using Python Rating: 5 out of 5 stars5/5What Is Coding? Rating: 0 out of 5 stars0 ratingsWhat Is Computer Coding? Rating: 0 out of 5 stars0 ratingsTrackpad Pro Ver. 5.0 Class 6 Rating: 0 out of 5 stars0 ratingsSimple Coding Rating: 0 out of 5 stars0 ratingsBreaking the Code: Five Steps to a Life-Changing Software Development Job Rating: 0 out of 5 stars0 ratingsYou Can't Dance to These Rhythms: What Are Algorithms? Rating: 0 out of 5 stars0 ratingsProgramming And Coding begginers level Rating: 0 out of 5 stars0 ratingsTouchpad Modular Ver. 1.1 Class 6 Rating: 0 out of 5 stars0 ratingsTouchpad Prime Ver. 2.1 Class 2: Windows 10 & MS Office 2016 Rating: 0 out of 5 stars0 ratingsGetting Started with Coding: Get Creative with Code! Rating: 0 out of 5 stars0 ratingsThe Wide World of Coding: The People and Careers behind the Programs Rating: 0 out of 5 stars0 ratingsCODING FOR KIDS: Beginners' Complete And Intuitive Guide To Learning To Code (2022 Crash Course for Newbies) Rating: 5 out of 5 stars5/5Touchpad Plus Ver. 3.1 Class 3: Linux & LibreOffice Rating: 0 out of 5 stars0 ratingsTouchpad Plus Ver. 2.1 Class 2 Rating: 0 out of 5 stars0 ratingsBrown Dogs and Barbers Rating: 0 out of 5 stars0 ratingsRead Write Code: A Friendly Introduction to the World of Coding, and Why It’s the New Litera Rating: 0 out of 5 stars0 ratingsWhat's Inside My Computer? Rating: 0 out of 5 stars0 ratingsCode Foundations Rating: 0 out of 5 stars0 ratingsTouchpad Plus Ver. 4.0 Class 2 Rating: 0 out of 5 stars0 ratingsUnderstanding Computers, Smartphones and the Internet Rating: 5 out of 5 stars5/5Essential Computer Hardware: Understanding the Building Blocks of Modern Technology and Securing Your Digital World Rating: 0 out of 5 stars0 ratingsCode Wizards: A Kids Guide to Computer Programming Rating: 0 out of 5 stars0 ratingsLearn to Program Rating: 1 out of 5 stars1/5Learn Computer Science Rating: 0 out of 5 stars0 ratingsPYTHON PROGRAMMING Rating: 4 out of 5 stars4/5
Computers For You
Elon Musk Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5The Self-Taught Computer Scientist: The Beginner's Guide to Data Structures & Algorithms Rating: 0 out of 5 stars0 ratingsCompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5Mastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 4 out of 5 stars4/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsHow to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5Learning the Chess Openings Rating: 5 out of 5 stars5/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 5 out of 5 stars5/5Quantum Computing For Dummies Rating: 3 out of 5 stars3/5Computer Science I Essentials Rating: 5 out of 5 stars5/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsBecoming a Data Head: How to Think, Speak, and Understand Data Science, Statistics, and Machine Learning Rating: 5 out of 5 stars5/5A Brief History of Artificial Intelligence: What It Is, Where We Are, and Where We Are Going Rating: 4 out of 5 stars4/5101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5A Quickstart Guide To Becoming A ChatGPT Millionaire: The ChatGPT Book For Beginners (Lazy Money Series®) Rating: 4 out of 5 stars4/5Discord For Dummies Rating: 0 out of 5 stars0 ratingsSome Future Day: How AI Is Going to Change Everything Rating: 0 out of 5 stars0 ratingsThe Technological Republic: Hard Power, Soft Belief, and the Future of the West Rating: 0 out of 5 stars0 ratingsThe Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5
Reviews for Learn Coding Basics in Hours with Python
0 ratings0 reviews
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:
●