Book Image

AI Crash Course

By : Hadelin de Ponteves
5 (4)
Book Image

AI Crash Course

5 (4)
By: Hadelin de Ponteves

Overview of this book

Welcome to the Robot World … and start building intelligent software now! Through his best-selling video courses, Hadelin de Ponteves has taught hundreds of thousands of people to write AI software. Now, for the first time, his hands-on, energetic approach is available as a book. Starting with the basics before easing you into more complicated formulas and notation, AI Crash Course gives you everything you need to build AI systems with reinforcement learning and deep learning. Five full working projects put the ideas into action, showing step-by-step how to build intelligent software using the best and easiest tools for AI programming, including Python, TensorFlow, Keras, and PyTorch. AI Crash Course teaches everyone to build an AI to work in their applications. Once you've read this book, you're only limited by your imagination.
Table of Contents (17 chapters)
16
Index

Displaying text

We'll begin with the most popular way of introducing any programming language; you'll learn how to display some text in the Python console. The console is a tool that's part of every Python editor, which shows the information we want or displays any errors that occurred (let's hope not to get any!).

The easiest way to show something in our console is to use the print() method, just like this:

# Displaying text
print('Hello world!')

The text above print, starting with #, is called a comment. Comments are excluded when executing code and are only visible to you.

After running this short code in Google Colab, you'll see this displayed:

Hello world!

In conclusion, just put what you want to display into the brackets of the print method – text surrounded by quotes, as in this example, or variables.

If you're curious about what variables are, that's great – you'll learn about them...