Skip to content

Perform your first calculation

TIPD edited this page Sep 22, 2022 · 1 revision

Perform your first calculation

Now that you installed Calcium on your computer, you can use it in your Python projects. Here you will find out how to perform a calculation with Calcium. Go ahead and create a Python script and write this:

from pycalcium import * #Imports Calcium (pycalcium)

calculation = Calcium("1 + 1") #Performs the calculation and saves the output to a variable called 'calculation'
print(calculation.value) #Prints the Calcium output

Output: 2

You have successfully performed your first calculation using Calcium!

Clone this wiki locally