Simple Arithmetic, Input and Output in Python Summary
Summary
Basic Mathematical Expressions
+, -, *, /, %, //, and **
operators, beware of division by zero.Text IO
\
) to use in strings/
), without any trailing space to divide the source code into multiple lines.\n
, the new-line character inside stringsend
and sep
arguments of the print()
function.print()
function.input()
from the terminal and assigning the value to a variable.*
operator. Concatenating strings using the +
operator.int()
and float()
functions to convert, a string to numerical form, i.e. type casting.open()
function to read()
from and write()
to a file in the computer, with different access modes.try-except
for runtime error handling.Drawing with Input