Actions

Difference between revisions of "Python values variables"

From ACL@NCU

 
Line 1: Line 1:
==Define a string==
=Values=
==Integer==
<syntaxhighlight lang="python" style="border:1px black">
10
3 + 6
3*5
</syntaxhighlight>
==Floats==
<syntaxhighlight lang="python" style="border:1px black">
10.0
4.0*8
</syntaxhighlight>
 
 
==Define a variable==
<syntaxhighlight lang="python" style="border:1px black">
<syntaxhighlight lang="python" style="border:1px black">
x = "Hello World!"
x = "Hello World!"

Latest revision as of 05:47, 14 March 2018

Values

Integer

10
3 + 6
3*5

Floats

10.0
4.0*8


Define a variable

x = "Hello World!"

Quotes

y = "I like python!"
z = 'I like python!'
y_z = "I 'like' python!"

print y, z, y_z