+ 4

What's the meaning of this code??

Print("example %.2f" %36)

10th Oct 2019, 12:51 PM
Masoud
Masoud - avatar
5 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.
10th Oct 2019, 1:06 PM
Seb TheS
Seb TheS - avatar
+ 1
Thanks­čÖĆ
10th Oct 2019, 7:11 PM
Masoud
Masoud - avatar
0
Hey pliz complite . Complete the code to create a string containing a double quote.
11th Oct 2019, 2:52 AM
AHL ESSAID OMAR
AHL ESSAID OMAR - avatar
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
11th Oct 2019, 1:52 PM
Mohit Gautam
Mohit Gautam - avatar
0
I c
11th Oct 2019, 9:49 PM
Emma