From the course: Dynamo for Revit: Python Scripting

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Numbers

Numbers

From the course: Dynamo for Revit: Python Scripting

Start my 1-month free trial

Numbers

- [Instructor] Python is made up of many different native data types including integers, doubles, strings, and booleans. All of which you may be familiar with from Dynamo. In Python, let's have a look at two number types that are commonly used, the integer and the double. Once we understand how the two different number types work, we'll look at the different arithmetic operators that we can use with both. Let's start by placing a new Python script note. An integer is a whole number, which can be either positive or negative. For example let's create a variable named int and we'll assign this one. We now have an integer. We can also use negative numbers. For example, let's create a variable named negint and we'll assign to that negative one. Both of these are integers. A double on the other hand can be thought of as a decimal point number or what's known as a floating point numbers. For example, let's create a variable named double and assign to this 1.0. We now have a double stored…

Contents