Negative Numbers in Python

Numbers can be negative. To do this, you need to put a minus sign before the number:

pythonnum = -1
print(num) # -1

The minus sign can be written both for numbers and for variables:

pythonnum1 = 1
num2 = -num1 # wrote the contents of num1 with the opposite sign to num2
print(num2)  # -1

Or like this:

pythonnum = 1
print(-num) # -1
Задание 1

Create a variable test with the value -100. Print this value to the console.

Задание 2

Create a variable test, write some positive or negative number into it. Output this number with the opposite sign to the console.

Задание 3

Let's say you have a variable test with a negative number. Subtract -20 from it. Print the result to the console.