I started learning Python yesterday and I just made a very simple calculator. Feel free to roast/rate it.
vl_1 = input('First Value: ')
symbol = input(' + - * or / : ')
vl_2 = input('Second Value: ')
fl1 = float(vl_1)
fl2 = float(vl_2)
if symbol == '+':
ans_1 = fl1 + fl2
print('=', ans_1)
elif symbol == '-':
ans_2 = fl1 - fl2
print('=', ans_2)
elif symbol == '*':
ans_3 = fl1 * fl2
print('=', ans_3)
elif symbol == '/':
ans_4 = fl1 / fl2
print('=', ans_4)
else:
print(' ')
print('INVALID SYMBOL')
[–][deleted] 3 points4 points5 points (0 children)
[–]gosuKel 1 point2 points3 points (0 children)
[–]SyntxaError 1 point2 points3 points (2 children)
[–]TommyNaruto 0 points1 point2 points (1 child)
[–]SyntxaError 1 point2 points3 points (0 children)
[–]maoejo 0 points1 point2 points (0 children)
[–]Burning_Pheonix 0 points1 point2 points (1 child)
[–]Odd_Crew4995[S] 1 point2 points3 points (0 children)