Warum bekomme ich hier einen zusätzlichen Platz?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Warum bekomme ich hier einen zusätzlichen Platz?

by Anonymous » 18 May 2025, 22:32

air_temperature = float(input())
print('{:C>.1f}'.format(air_temperature), 'C')
< /code>
Your output: 36.4 C
Expected output 35.4C
< /code>
Error Message
Why am I being told there is an extra space here that is extraneous, and how do I get rid of it?
I am learning about string formatting, and thought I followed the instructions correctly.
I am trying to have only 1 place after the decimal in my float, followed by a C. I have to have the '{}' part in it, and it looks to me to be correct, but is showing that I have an extra space for some reason after the float, before the "C".
What can I try next?

Top