Python. Easy Steps to Learning.
()
About this ebook
Basic programming using Python.
Included is input, process and output. The book also include basic programming principles such as sequencing, iteration and selection.
Renier Engelbrecht
I am a teacher at a public school in South Africa. My interests include programming (Python, HTML, CSS, Javascript, Delphi, Java) and gardening.
Related to Python. Easy Steps to Learning.
Related ebooks
Coding for Beginners and Kids Using Python: Python Basics for Beginners, High School Students and Teens Using Project Based Learning Rating: 3 out of 5 stars3/5Python: Tips and Tricks to Programming Code with Python Rating: 0 out of 5 stars0 ratingsPython Handbook For Beginners. A Hands-On Crash Course For Kids, Newbies and Everybody Else Rating: 0 out of 5 stars0 ratingsPython for Beginners: Learn It as Easy as Pie Rating: 0 out of 5 stars0 ratingsPython Programming: Your Beginner’s Guide To Easily Learn Python in 7 Days Rating: 3 out of 5 stars3/5Python Programming: Your Advanced Guide To Learn Python in 7 Days Rating: 0 out of 5 stars0 ratingsLearning Open Office: Calc & Base Rating: 0 out of 5 stars0 ratingsMission Ruby Rating: 0 out of 5 stars0 ratingsPython: Beginner's Guide to Programming Code with Python Rating: 0 out of 5 stars0 ratingsIntroduction to Python 2018 Edition Rating: 4 out of 5 stars4/5Python Programming for Beginners Crash Course with Hands-On Exercises, Including NumPy, Pandas and Matplotlib Rating: 0 out of 5 stars0 ratingsProblem Solving in C and Python: Programming Exercises and Solutions, Part 1 Rating: 5 out of 5 stars5/5Python: Programming For Intermediates: Learn The Basics Of Python In 7 Days! Rating: 0 out of 5 stars0 ratingsLearn Programming by Coding Like a Professional: Create Games, Apps, & Programs Rating: 0 out of 5 stars0 ratingsLearn VBScript in 24 Hours Rating: 0 out of 5 stars0 ratingsPython Programming for Beginners: A guide to Python computer language, computer programming, and learning Python fast! Rating: 0 out of 5 stars0 ratingsPython: Advanced Guide to Programming Code with Python: Python Computer Programming, #4 Rating: 0 out of 5 stars0 ratingsProgramming in Visual Basic (VB): For Visual Studio Rating: 0 out of 5 stars0 ratingsPython from the Very Beginning Rating: 0 out of 5 stars0 ratingsAssistant Workers' Compensation Examiner: Passbooks Study Guide Rating: 0 out of 5 stars0 ratingsLearn Java with Math: Using Fun Projects and Games Rating: 0 out of 5 stars0 ratingsArray Data Type A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsMicrosoft Conversational AI Platform for Developers: End-to-End Chatbot Development from Planning to Deployment Rating: 0 out of 5 stars0 ratingsExcel VBA 24-Hour Trainer Rating: 3 out of 5 stars3/5Software Construction A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsFlutter for Jobseekers: Learn Flutter and take your cross-platform app development skills to the next level (English Edition) Rating: 0 out of 5 stars0 ratings
Teaching Methods & Materials For You
Dumbing Us Down - 25th Anniversary Edition: The Hidden Curriculum of Compulsory Schooling Rating: 4 out of 5 stars4/5Lies My Teacher Told Me: Everything Your American History Textbook Got Wrong Rating: 4 out of 5 stars4/5Speed Reading: Learn to Read a 200+ Page Book in 1 Hour: Mind Hack, #1 Rating: 5 out of 5 stars5/5Verbal Judo, Second Edition: The Gentle Art of Persuasion Rating: 4 out of 5 stars4/5Weapons of Mass Instruction: A Schoolteacher's Journey Through the Dark World of Compulsory Schooling Rating: 4 out of 5 stars4/5Financial Feminist: Overcome the Patriarchy's Bullsh*t to Master Your Money and Build a Life You Love Rating: 5 out of 5 stars5/5Becoming Cliterate: Why Orgasm Equality Matters--And How to Get It Rating: 4 out of 5 stars4/5Fluent in 3 Months: How Anyone at Any Age Can Learn to Speak Any Language from Anywhere in the World Rating: 3 out of 5 stars3/5Personal Finance for Beginners - A Simple Guide to Take Control of Your Financial Situation Rating: 5 out of 5 stars5/5Grit: The Power of Passion and Perseverance Rating: 4 out of 5 stars4/5The 5 Love Languages of Children: The Secret to Loving Children Effectively Rating: 4 out of 5 stars4/5Closing of the American Mind Rating: 4 out of 5 stars4/5Jack Reacher Reading Order: The Complete Lee Child’s Reading List Of Jack Reacher Series Rating: 4 out of 5 stars4/5How to Take Smart Notes. One Simple Technique to Boost Writing, Learning and Thinking Rating: 4 out of 5 stars4/5Principles: Life and Work Rating: 4 out of 5 stars4/5Inside American Education Rating: 4 out of 5 stars4/5The Chicago Guide to Grammar, Usage, and Punctuation Rating: 5 out of 5 stars5/5From 150 to 179 on the LSAT Rating: 4 out of 5 stars4/5Good to Great: Why Some Companies Make the Leap...And Others Don't Rating: 4 out of 5 stars4/5The Lost Tools of Learning Rating: 5 out of 5 stars5/5Everything You Need to Know About Personal Finance in 1000 Words Rating: 5 out of 5 stars5/5My System Rating: 4 out of 5 stars4/5The 5 Love Languages of Teenagers: The Secret to Loving Teens Effectively Rating: 4 out of 5 stars4/5The Science of Making Friends: Helping Socially Challenged Teens and Young Adults Rating: 5 out of 5 stars5/5Speed Reading: How to Read a Book a Day - Simple Tricks to Explode Your Reading Speed and Comprehension Rating: 4 out of 5 stars4/5The Four-Hour School Day: How You and Your Kids Can Thrive in the Homeschool Life Rating: 5 out of 5 stars5/5A Failure of Nerve: Leadership in the Age of the Quick Fix (10th Anniversary, Revised Edition) Rating: 4 out of 5 stars4/5How to Diagnose and Fix Everything Electronic, Second Edition Rating: 4 out of 5 stars4/5Who Gets In and Why: A Year Inside College Admissions Rating: 4 out of 5 stars4/5
Reviews for Python. Easy Steps to Learning.
0 ratings0 reviews
Book preview
Python. Easy Steps to Learning. - Renier Engelbrecht
Python is simple language to understand as most of the commands are plain English. In this chapter, you are going to use Python to create simple scripts, in the interactive interpreter. An interpreted language is where the interpreter runs command for command, as opposed to a compiler language that takes all the code, compiles to byte code/executable and then runs the program. Therefore, Python can have an interactive compiler, as Python is an interpreted language. The user enters a command in the interactive interpreter, and the command is executed. In this series the focus is on Python 3.7. There are two major versions of Python. The first is 2.7 and then there is 3.7. The difference is that 3.7 is the newest version that is to a major extend incompatible with code from 2.7. To maintain continuity and let developers make a transition to version 3, the older version is still supported. To use the newest version is better, as this contains all the new syntax and other enhancements.
The interactive Python Shell, as the screenshot above is called, is mainly used for short interactive sessions where the user wants to write short amount of code, to test, debug (clear errors), or write specific procedures. In this chapter we focus on this interactive session. As soon as the Python IDLE Shell is closed, all data entered will be erased! Start Python IDLE.
The shortest program that one can write is where the interpreter greets a person. For example; Hi there Sally! To do this, the user writes this in a print statement.
Output
Hi there Sally! Hi there Sally!
The user entered a print statement. Take note of the following: all lower case the word print; and whatever the user wants to displayed is between round brackets and single/double inverted commas. The user can use either double () or single (‘’) inverted commas to display the output or the message. The difference between the two is minimal and will be explained at later stage in detail. In this example, the user displayed a message, or output a message. Another interesting fact is that there are two commands. Each command starts on a new line!
Activity 1
1.1. Write a statement where the computer greets you showing your name.
1.2. Write two statements where the compute greet you showing your name on one line and your surname on the next line.
Variables
Python is very good at storing of data. To store data, either storing, using or recalling data. In Python there are a few different types. However, for a start the focus is on numbers and text only. Other types will be focused on at a later stage.
Numbers
Python supports two types of numbers. The first is integers (7, 10, 12, 20000) and floating point numbers.
Integers
To define integers, assignments (to give a value to a part of RAM with a name that the user specify)