Horje
python multiply 2 variables Code Example
multiplication of two or more numbers in python
# multiplication of two or more numbers
def multiple(*a):
    result = 1
    for i in a:
        result = result * i
    return result


# insert any number of arguments for multiplication, example:
res = multiple(12, 2, 5)
print(res)
# In this example, code output is = 120
python multiply 2 variables
num1 = "2" # first variable
num2 = "2" # second variable
output = num1*num2 # multiplied number

# Optional: print multiplied number
print(output)




Python

Related
cryptography  'openssl/opensslv.h' file not found Code Example cryptography 'openssl/opensslv.h' file not found Code Example
math solving in python Code Example math solving in python Code Example
from future import division Code Example from future import division Code Example
mathematical problems in python Code Example mathematical problems in python Code Example
how to break an if statement python Code Example how to break an if statement python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7