The World's SMALLEST Calculator In Python?

preview_player
Показать описание
The world's smallest caclulator in Python? #Python #Code #Shorts
Рекомендации по теме
Комментарии
Автор

So could I not make my own module using this then import it and have it be about 2-3 lines and say it’s even smaller?

jayco
Автор

Am i stupid, why dont we just type print(2**5) or anything else

cnarozdemir
Автор

def calc(sign, x, y):
return {
"+": x + y,
"-": x - y,
"*": x * y,
"/": x / y,
"**": x ** y
}[sign]


print(calc("**", 2, 5))

databeliever
Автор

This is like poop in your hand and throw it in the toilet

jorgehenriquesoares
Автор

while 1:
try:
print(eval((input(">>> "))))
except:
print("Only Integer Float number e.g - 2+2 4.7*5");

idk____idk
Автор

One line code right here:

print(eval(input(“Math problem: ”)))

AtomicCrystal
Автор

Crazy how lua is regarded as an "ok" language bit it can make a calculator in 2 lines of code

TeamReboot
Автор

the smallest calculator is

print(eval(input()))

AcceleratedVelocity
Автор

If you had an input it would be interesting

pirunnyrkki
Автор

I am curious. So whenever we use the plus operator on any two numbers, it maps to the add function in operator?

adventuresofavalon
Автор

On what real project you will be able to use it in?!

j.
Автор

Визуализировать не виде чисел или строк, а соединить строки с уже созданными программы, так чтоб получить web глубину если, если применить матрицу, с вершинами x, . Y спасибо большое если ответите развёрнуто, а то мне ни как не могу понять куда мне это все применить. Спасибо.

Hortton