1. 학습
  2. /
  3. 강의
  4. /
  5. Python for MATLAB Users

Connected

연습 문제

Basic calculations

Like MATLAB, you can use Python to perform basic calculations. Most of the standard operators are similar between MATLAB and Python.

Addition +
Subtraction -
Multiplication *
Division /
Exponentiation **

One crucial difference is the operator for taking a number to a power. In Python, the ^ operator does something else entirely… you'll need to make sure you use ** when you want to square a number.

지침 1/4

undefined XP
  • 1

    Print 2 minus 3.

  • 2

    Print 2 times 3.

  • 3

    Print 2 divided by 3.

  • 4

    Print 2 taken to a power of 3.