a = float(input("Enter first number: "))
b = float(input("Enter second number: "))
print('The product of {first} and {sec} is: ',a*b).format(first = a, sec = b)
print('The sum of {first} and {sec} is: ',a+b).format(first = a, sec = b)
Something of AttributeError is coming. Can you guys fix this, Need it for school project.
I tried this placeholder from [https://www.w3schools.com/python/ref_string_format.asp]
The order of your parameters is wrong:
Or for better understanding:
However, it would be better to use
f-strings:Output: