• Home
  • Python
    • Introduction to Python
    • Python Developer
    • Expert Python Developer
  • JavaScript
    • Introduction to JavaScript
    • JavaScript Developer
    • Expert JavaScript Developer
  • React.js
    • Introduction to React
    • React Developer
    • Expert React Developer
  • Linux
    • CyberSecurity - Introduction to Linux
    • CyberSecurity - Linux Administrator
    • CyberSecurity - Expert Linux Administrator
  • Active Directory
    • CyberSecurity - Introduction to Active Directory
    • CyberSecurity - Active Directory Administrator
    • CyberSecurity - Expert Active Directory Administrator
  • Interactive Training
  • Pricing
  • Brainstorm
STEMTrainingGrounds
  • Courses
    • Home
    • Python
      • Introduction to Python
      • Python Developer
      • Expert Python Developer
    • JavaScript
      • Introduction to JavaScript
      • JavaScript Developer
      • Expert JavaScript Developer
    • React
      • Introduction to React
      • React Developer
      • Expert React Developer
    • Linux
      • CyberSecurity - Introduction to Linux
      • CyberSecurity - Linux Administrator
      • CyberSecurity - Expert Linux Administrator
    • Active Directory
      • CyberSecurity - Introduction to Active Directory
      • CyberSecurity - Active Directory Administrator
      • CyberSecurity - Expert Active Directory Administrator
  • Interactive Training
  • Pricing
  • Brainstorm

Quick Links

  • About Us
  • Pricing
  • Brainstorm

Courses

  • Python
    • Introduction to Python
    • Python Developer
    • Expert Python Developer
  • JavaScript
    • Introduction to JavaScript
    • JavaScript Developer
    • Expert JavaScript Developer
  • React
    • Introduction to React
    • React Developer
    • Expert React Developer
    • Professional Master React Developer
  • Linux
    • CyberSecurity - Introduction to Linux
    • CyberSecurity - Linux Administrator
    • CyberSecurity - Expert Linux Administrator
  • Active Directory
    • CyberSecurity - Introduction to Active Directory
    • CyberSecurity - Active Directory Administrator
    • CyberSecurity - Expert Active Directory Administrator

Newsletter

Subscribe to our monthly newsletter, for a quick update on Python, JavaScript, React news

© 2024 - 2026 STEMTrainingGrounds. All Rights Reserved.

Lesson 2 of 16

Lesson Progress: 0%

Code Example

# Demonstrates data types
print(type(5))
print(type(3.14))
print(type("Hello"))
print(type("Welcome"))

Instructions

▲ ← Click the triangle to hide or reveal instructions.
  • The code editor is below.
  • The left side of the code editor is where you type your input code.
  • The right side of the code editor is where you see the output of your code.
  • Practice by typing the code example above, in the left side of the code editor below.
  • Then click the "Run Code" button, to run the code.
  • You will see the output of your code in the output section.

Python Code Editor

Task Incomplete

Editor Input:

Loading...

Editor Output:

Click "Run Code" to see the output here
  • Sometimes we want to ask Python, “What kind of thing is this?”
  • Python has a helper called type() that tells us what kind of data something is.
  • All you need to do is put your value inside type(), like this: type(5).
  • To see the answer on the screen, we use print() in front of it.
  • So we write: print(type(5)).
  • This shows that 5 is a whole number.
  • print(type(3.14)) shows that 3.14 is a decimal number.
  • print(type("Hello")) shows that "Hello" is text (words).
  • A string is text in Python, written inside quotes.
  • Strings must always be inside quotes " " in Python.
  • Each line checks one value and prints what type it is.
  • This helps us understand what kind of data our program is using.
Data TypeExamples
Integer5
Integer42
Float3.14
Float0.5
String"Hello"
String"Welcome123!"
String"Fun@Code#2026"
  • The int data type is for integer.
  • Integers are simply numbers without decimal points.
  • The float data type is simply for numbers with a decimal point.
  • Strings can display almost anything.
  • A string starts with double quotes and ends with double quotes.
  • A string can also start with a single quote and end with a single quotes.
  • You will learn some more useful data types throughout this course.
Lesson Progress: 0%
Lesson Incomplete
← Previous: Basic Output
Lesson 2 of 16
Next: Operators →