Python syntax.

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Python syntax.

Message par compsystems » mer. févr. 27, 2019 10:35 pm

hello BP

if the last instruction ends with;, generates error

17 / 3; # classic division
17 / 3.; # approximate value calculation
17 // 3; # floor division discards the fractional part
17 % 3; # the % operator returns the remainder of the division
5 * 3 + 2; # result * divisor + remainder
[enter] error

17 / 3; # classic division
17 / 3.; # approximate value calculation
17 // 3; # floor division discards the fractional part
17 % 3; # the % operator returns the remainder of the division
5 * 3 + 2 # result * divisor + remainder
[enter]
17/3, 5.66666666667, 5, 2, 17

parisse
Messages : 5743
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Python syntax.

Message par parisse » jeu. févr. 28, 2019 6:53 am

You mean ; followed by a comment?
Sorry, this does not seems to be supported, but it's not important because it's not the way people would write this in Python syntax.

Répondre