The article shows how to use python and Mathematica to do elementary arithmetic with a few examples.
The examples come from An Elementary Introduction To The Wolfram Language

Calculate 10 to the power 12

python:
print( 10**12 )
wolfram:
10^12
=> 1000000000000

Compute 2 to the power 2 to the power 2 to the power 2

python:
result = 2
for i in range(3):
    result = pow(2, result)

print( result )
wolfram:
2^2^2^2
2^2^2^2 = 2^(2^(2^2))
=> 65536

Add the whole numbers from 1 to 10

python:
result = 0
for i in range(10):
    result = result + i+1

print( result )
wolfram:
sum = 0
Do [ sum = sum+i
 ,{i,10}
 ]

Print[sum]
=> 55

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X
0
Would love your thoughts, please comment.x
()
x