Stay Tuned!

Subscribe to our newsletter to get our newest articles instantly!

Programming

Crash Course on Python

Background

As we are brushing up on IT skills, I explore the Google Certificate in relation to Crash Course on Python.

The Findings

Resources –

The official Python tutorial. This tutorial is designed to help people teach themselves Python. While it goes in a different order than the one we’re taking here, it covers a lot of the same subjects that we explore in this course. You can refer to this resource for extra information on these subjects.

The Think Python book. This book aims to teach people how to program in Python. It’s available online in PDF and browsable forms. Again, you can use this resource to learn more about some of the subjects we cover.

Below, you’ll find links to some of the most popular online interpreters and codepads. Give them a go to find your favorite.




Keywords are reserved words that are used to construct instructions. We briefly encountered for and in in our first Python example, and we’ll use a bunch of other keywords as we go through the course. For reference, these are all the reserved keywords:

Falseclassfinallyisreturn
Nonecontinueforlambdatry
Truedeffromnonlocalwhile
anddelglobalnotwith
aselififoryield
assertelseimportpass
breakexceptinraise

You don’t need to learn this list; we’ll dive into each keyword as we encounter them. In the meantime, you can see examples of keyword usage here.

Arithmetic operators

Python can operate with numbers using the usual mathematical operators, and some special operators, too. These are all of them (we’ll explore the last two in later videos).

  • a + b = Adds a and b
  • a – b = Subtracts b from a
  • a * b = Multiplies a and b
  • a / b = Divides a by b
  • a ** b = Elevates a to the power of b. For non-integer values of b, this becomes a root (i.e. a**(1/2) is the square root of a)
  • a // b = The integer part of the integer division of a by b
  • a % b = The remainder part of the integer division of a by b

The End

Big shout out for the excellent photo by Christina Morillo.




Avatar

Dewapost Team

About Author

Creator and Administrator of Dewapost. Love tech, creative and e-business of any kind :)

You may also like

Programming

SQL: Performance Tuning Query

Queries — Basic setup DBCC DROPCLEANBUFFERSDBCC FREEPROCCACHE SET STATISTICS IO ONSET STATISTICS TIME ON /* SELECT * FROM dbo.Categories*/ Sources
Programming

Notes: Road to Yii Framework

Apache2 Configuration on MAC Snow Leopard: /etc/apache2/httpd.conf “It worksP page is located under: /Library/WebServer/Documents/index.html.en To restart apache2 after changing: sudo apachectl