Data Types in Python



Author: Diana Sadyrova

Course description

This course is going to help you dive deeper into data types and try to work with them. Here you will learn basic operations and all ins and outs of numbers, boolean data type, and strings. This course consists of a lot of practical tasks after which you will become a skillful programmer.


Complete all chapters to get certificate


Getting Familiar With Numbers in Python


Numeric data types are crucial in Python, so it is important to start with them. Here you will work with simple math operations and find out the purposes of learning different types of numerical data.

Numerical Data Type in General

Mutable or Immutable?

Integer Numbers

Floating-Point Numbers

Imaginary Numbers (Complex)

Real and Imaginary Parts

Compulsory Math

Complicated Math


How to Define a Type


True or False?


The main goal of this section is to clarify the boolean data types; it's a sub type of numeric data, but indeed it is more challenging. Since it is always better to excel in the more difficult topics, this section is a valuable part of your curriculum.

Introduction to Boolean Data Type


And Or Not

Boost Your Logical Skills

Dealing With a Not Statement

Work With Logical Statements




Strings are a way for us to implement your phrases in Python, that is, to give instructions to users who are the target audience of your program. Indeed, it is always better to be able to work with strings because they should be used in your code. You'll understand why soon.

Output Your String

Quotation Marks

Get Acquainted With Indexation

Slice the Word

Negative Indexation

Slice the Phrase

Slicing Task

How to Find the String Length

Get the Index of the Letter

Find the Word Index


Is String Mutable?

Merge Strings

Bring All the Topics Together


This chapter consists of practical tasks that combine all the examined topics together with a bit of theory.

Convert Types

Useful Converting

Converting: float()

Converting: bool()

Converting: str()

Math in Strings

Compare Strings