DEV Community

Cover image for Programming with Python:print statement
EzeanaMichael
EzeanaMichael

Posted on • Updated on

Programming with Python:print statement

PRINT
First off, download an application that runs python commands, either on your Personal Computer (preferably), by logging in to www.python.org and downloading the IDE( integrated development environment) or by downloading visual studio code and the python extension file, or on your android device(I recommend the pydroid3 application for this.)

We start by printing a simple Hello world statement which we do by typing print("Hello, world"),the hello world would have to be kept in-between double quotes or single quotes because it’s a string, otherwise it’ll generate an error.

Image description

Image description

Image description

Image description

Also variables with datatype int or floats can easily be printed out just by placing them in the print keyword while strings are placed in double quotes.

Image description

Image description

Image description

Image description

To explain more
Datatypes are used to specify and identify the type of variables utilized in the program, there are several data types in python including :

  • Strings-these are letters or characters that are represented in-between single quotes, ('') or double quotes, (""). Examples: "Apple", 'john'
  • Integers-these are numeric values Examples:1,3,25
  • Float-these are floating-point numbers which can also be known as decimal numbers. Example:2.0,2.35
  • Boolean-These are values with only two outputs, true or false.

We'll learn more about them and make use of them in further lessons

Hope you enjoyed today's lesson, like, comment, share, and see you next time.

Oldest comments (0)