Input four float numbers; they could be positive or negative.
Only add all inputted negative numbers, and print its sum, up to 2 decimal place.
1
Expert's answer
2021-12-01T18:38:07-0500
nums=input("Enter four decimals/floats separated by a space:")
n=nums.split(" ")
sum_neg=0.0for iin n:
x=float(i)
if(x<0):
sum_neg+=xprint("{:.2f}".format(sum_neg)
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments