# operators = '+/*%-++/-'
# numbers = '1;2;3;4;5;6;7;8;9;10'
operators = input('Enter 9 random arithmetic op: ')
numbers = input('Enter 10 values separated by semicolon (;): ')
zipped = zip(numbers.split(';'), list(operators + ' '))
result = ''.join([num for op in zipped for num in op])
print(f'\nThe result of {result} is: {eval(result)}')
OUTPUT:
The result of 1+2/3*4%5-6+7+8/9-10 is: -4.444444444444445
ps. sakto wala akong ginagawa kaya sinagot ko nalang haha pero next time lagay karin ng input mo kahit may error
# operators = '+/*%-++/-'
# numbers = '1;2;3;4;5;6;7;8;9;10'
operators = input('Enter 9 random arithmetic op: ')
numbers = input('Enter 10 values separated by semicolon (;): ')
zipped = zip(numbers.split(';'), list(operators + ' '))
result = ''.join([num for op in zipped for num in op])
print(f'\nThe result of {result} is: {eval(result)}')
OUTPUT:
The result of 1+2/3*4%5-6+7+8/9-10 is: -4.444444444444445
ps. sakto wala akong ginagawa kaya sinagot ko nalang haha pero next time lagay karin ng input mo kahit may error