Knowledge7

The Linux and Mobile Solution Provider

  • About
  • Training
  • Services
  • Clients
  • In the news
  • Blog
  • Contact Us
You are here: Home / Topic / Types and Variables

Types and Variables

This topic is part of our Mastering Computer Programming training

Welcome to our Mastering Computer Programming training!

Let us start by answering the following questions:

  • What is a computer?
  • What is computer science (also known as Informatique in countries such as France or Germany)?
  • What is a program?
  • What is a programming language?
  • Why Python?

The next step is to work through a series of exercises which will increase our understanding of computer programming using Python. For that, we will use the book How to Think Like a Computer Scientist / Learning with Python written by Jeffrey Elkner, Allen B. Downey, and Chris Meyers and which can be read online.

Try to find solutions to the exercises found at the end of Chapter 1 in the book, The Way of the Program. Pay special attention to the difference between evaluating an expression (e.g. ‘This is a test…’) as opposed to printing the evaluation of an expression (e.g. print ‘This is a test…’)

Variables, expressions and statements

Now, let’s tackle Chapter 2 of the book: Variables, expressions and statements. In Python, values are typed (i.e. integer, string, float, …) and, consequently, variables which contain values are also typed.

Let’s work out the exercises at the end of this Chapter. Pay special attention to the fact that an assignment has no value and, consequently, cannot be used in an expression. Furthermore, it is important to understand the difference between input() and raw_input().

This topic is part of our Mastering Computer Programming training

Our forthcoming training courses

  • No training courses are scheduled.

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for something?

Want to know more?

Get our newsletter

Discover the latest news, tips and tricks on Linux, the Web and Mobile technologies every week for FREE

This work is licensed by Knowledge7 under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.