Python | Decimal logical_or() method Last Updated : 05 Sep, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report Decimal#logical_or() : logical_or() is a Decimal class method which returns the digit-wise or of the two Decimal values. Syntax: Decimal.logical_or() Parameter: Decimal values Return: the digit-wise or of the two (logical) of the Decimal values. Code #1 : Example for logical_or() method Python3 # Python Program explaining # logical_or() method # loading decimal library from decimal import * # Initializing a decimal value a = Decimal('0') b = Decimal('1') # printing Decimal values print ("Decimal value a : ", a) print ("Decimal value b : ", b) # Using Decimal.logical_or() method print ("\n\nDecimal a with logical_or() method : ", a.logical_or(b)) print ("Decimal b with logical_or() method : ", b.logical_or(b)) Output : Decimal value a : 0 Decimal value b : 1 Decimal a with logical_or() method : 1 Decimal b with logical_or() method : 1 Code #2 : Example for logical_or() method Python3 # Python Program explaining # logical_or() method # loading decimal library from decimal import * # Initializing a decimal value a = Decimal('1') b = Decimal('0') # printing Decimal values print ("Decimal value a : ", a) print ("Decimal value b : ", b) # Using Decimal.logical_or() method print ("\n\nDecimal a with logical_or() method : ", a.logical_or(a)) print ("Decimal b with logical_or() method : ", a.logical_or(b)) Output : Decimal value a : 1 Decimal value b : 0 Decimal a with logical_or() method : 1 Decimal b with logical_or() method : 1 Comment More infoAdvertise with us Next Article Python | Decimal logical_or() method N noobestars101 Follow Improve Article Tags : Python Practice Tags : python Similar Reads Python | Decimal logical_and() method Decimal#logical_and() : logical_and() is a Decimal class method which returns the digit-wise and of the two (logical) Decimal values. Syntax: Decimal.logical_and() Parameter: Decimal values Return: the digit-wise and of the two (logical) Decimal values. Code #1 : Example for logical_and() method Pyt 2 min read Python | Decimal logical_xor() method Decimal#logical_xor() : logical_xor() is a Decimal class method which returns the digit-wise exclusive or of the two Decimal values. Syntax: Decimal.logical_xor() Parameter: Decimal values Return: the digit-wise and of the two (logical) Decimal values. Code #1 : Example for logical_xor() method Pyth 2 min read Python | Decimal logical_invert() method Decimal#logical_invert() : logical_invert() is a Decimal class method which returns the digit-wise inversion of the Decimal values. Syntax: Decimal.logical_invert() Parameter: Decimal values Return: the digit-wise inversion of the Decimal values. Code #1 : Example for logical_invert() method Python3 2 min read Python | Decimal is_normal() method Decimal#is_normal() : is_normal() is a Decimal class method which checks whether the Decimal value is a normal finite number. Syntax: Decimal.is_normal() Parameter: Decimal values Return: true - if the Decimal value is a normal finite number; otherwise false Code #1 : Example for is_normal() method 2 min read Python | Decimal is_nan() method Decimal#is_nan() : is_nan() is a Decimal class method which checks whether the Decimal value is NaN value. Syntax: Decimal.is_nan() Parameter: Decimal values Return: true - if the Decimal value is NaN value; otherwise false Code #1 : Example for is_nan() method Python3 # Python Program explaining # 2 min read Like