This guide was designed to supplement the INTRODUCTION TO PYTHON virtual workshop. If you have concerns or suggestions for this guide, feel free to reach out to scholarlyengagement@tulane.edu.

- Getting Started
- Pre-Learning Survey
- Using Google Colab
- Data Types & Variable Assignment
- Operators (+, -, /, *, %, **)
- Assignment Operators (+=, -=, /=, *=, %=)
- Common Methods
- Common Functions
- Data Type Conversion
- Introduction to Libraries/Modules: Math
- Creating Comments
- Additional Learning Resources
- Post-Learning Survey
- Workshop FIle

**Operators** allow you to perform mathematical and syntactical processes on your data. Follow along with the code below to learn how to conduct these operations on variables.

**In this section, you will learn how to:**

*Conduct basic mathematical operations*

**Operators perform mathematical operations when applied to numeric variables or numerals**. Copy the following code on the left in your IDE to execute the process shown in the image on the right.

five = 5 * ** *

six = 6

print(five + six) #(Addition)

print (five*six) #(Multiplication)

print(five/six) #(Division)

print(five-six) #(Subtraction)

print (five%six) #(Modulo - returns the remain of a division operation)

print (five**six) #(Exponent)

**Operators perform syntactical edits when applied to text variables or text. **Copy the following code on the left in your IDE to execute the process shown in the image on the right.

name = "Jorge"

print(name*4)

name2 = "Jason"

print (name + " " + name2)

- Last Updated: May 29, 2024 3:56 PM
- URL: https://libguides.tulane.edu/introtopython
- Print Page

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.