+ 4
What's the meaning of this code??
Print("example %.2f" %36)
6 Antworten
+ 3
print(string % value) in Python corresponds printf(string, value) in C.
string % value is used to create C-style string formatting in Python.
In string:
% means that there is being inserted a value representation.
%f means that the inserted value must be represented as a floating point number.
%.2f means that the inserted floating point representation is limited to have only 2 decimal places.
+ 1
Thanks🙏
0
Hey pliz complite . Complete the code to create a string containing a double quote.
0
(A) if _ main _ == “ _ name _ “ : ... # suitable code (B) if _ main _ == “ _ mdl _ “ : ... # suitable code (C) if _ name _ == “ _ main _ “ : ... # suitable code (D) if _ name _ == “ _ mdl _ “ : ... # suitable code
0
I c