HomeCoursesIntroduction to Python

Variables and Data Types in Python

Chapter 2 · Python fundamentals · lesson 5 of 48
Reserved for subscribers — here is the beginning
Variables and data types Python allows you to perform simple calculations as well as more complex operations. To make these calculations easier and to reuse results within a program, it is useful to store values in variables. Data types then make it possible to determine the nature of the values being handled.Variable A variable makes it possible to store a value under a specific name so that it can be reused in a program. Variable names are case-sensitive, which means that uppercase and lowercase letters are considered different. To create a variable, simply use the equal sign (=) to assign it a value.For example, to
The rest of this lesson is reserved for subscribers Create your free account to try the sample exercises, then upgrade to full access whenever you like.

Create your free account

No credit card required, in thirty seconds.
Continue with Google
or
Sign up with an e-mail
Already registered? Log in
By continuing, you agree to the terms of use and the privacy policy. Your data is hosted in the European Union.

Full access DATAGOZ

19 €/ month — or 190 € / year
  • All published courses and career paths
  • Exercises and quizzes with automatic grading
  • Practice, exam and certificate of completion
  • No commitment, cancel online
See the plans
This lesson is part of the course

Introduction to Python

short_training6 chapters · 48 lessons

Discover the basics of Python and learn to program!

  • The training platformsubscribers
  • First steps with Pythonsubscribers
  • Write your first Python programsubscribers
  • Perform calculations with Pythonsubscribers
  • Variables and data types in Pythonyou are here
  • Assign values to variablessubscribers
  • Performing operations with variablessubscribers
  • Discover the other data typessubscribers
  • Work with different data typessubscribers
  • Use lists in Pythonsubscribers
  • Build a list in Pythonsubscribers
  • Combine lists with different data typessubscribers
  • Create nested lists in Pythonsubscribers
  • Extract elements from a list in Pythonsubscribers
  • Select subsets and spot the winssubscribers
  • Extract items by slicesubscribers
  • Select subsets in nested listssubscribers
  • Working with lists in Pythonsubscribers
  • Modify list itemssubscribers
  • Add items to a listsubscribers
  • Remove items from a listsubscribers
  • Understanding how lists worksubscribers
  • Create and use functions in Pythonsubscribers
  • Discover common functionssubscribers
  • Troubleshooting in Pythonsubscribers
  • Handling multiple arguments in Pythonabonnés
  • Using methods in Pythonabonnés
  • Methods for manipulating stringsabonnés
  • The main list methodsabonnés
  • Going deeper with list methodsabonnés
  • Understanding packages in Pythonabonnés
  • Importing a packageabonnés
  • Importing only the elements you needabonnés
  • The different import methodsabonnés
  • NumPy basicsabonnés
  • Create your first NumPy arrayabonnés
  • Baseball players' heightsubscribers
  • NumPy effectssubscribers
  • Extracting NumPy array subsetssubscribers
  • Manipulating 2D arrays with NumPysubscribers
  • Creating your first 2D array with NumPysubscribers
  • Representing 2D baseball datasubscribers
  • Extracting subsets from 2D NumPy arrayssubscribers
  • Performing calculations on 2D arrayssubscribers
  • Performing basic statistics with NumPysubscribers
  • Calculating the mean and mediansubscribers
  • Analyzing baseball datasubscribers
  • Course conclusionsubscribers
Next lesson

Assigning Values to Variables

View the programme Create an account to continue