Number as Text

Programs often need to turn numbers into text, for example to show them on the screen or combine them with another string. Write a function number_to_string that takes a number num and returns its string representation. For negative numbers, the minus sign should be kept.

Примеры

Ввод
67
Вывод
"67"
Ввод
0
Вывод
"0"
Ввод
-1
Вывод
"-1"

Нужно реализовать

def number_to_string(num: int) -> str:

Теги

stringsmath
PostgreSQLv16

Hier verschijnt het resultaat van je code

Visible tests
1
Input
67
Expected"67"
2
Input
0
Expected"0"
3
Input
-1
Expected"-1"
4
Input
123456
Expected"123456"
5
Input
42
Expected"42"
6
Input
-100
Expected"-100"
Focus radio
Paused · SomaFM · Fluid