The first day of school python

The first program:
Print ( 'the Hello World')
Results: Hello world # note is output for a single and double quotation marks are lines
subtraction:
A = int (INPUT ())
B = int (INPUT ())
Print (A + b)
results:. 6
         . 7
         13 is
On Sep = ',' designated as a delimiter
example: print (100,200, 'haha' , 'heihei', sep = ',')
simple encryption:
QQ = INPUT ()
for I in QQ : ascii # out the current value of the
    res = ord (i) + 4 # 4 was added into the string an integer
    res2 = chr (res) # is converted into a string
    print (res2, end = "" )
access:
a = 'zhanran'
Print (A [. 1:. 3])
results: HA
iS a comparison memory address:
A = 66666666
B = 66666666
Print (A iS B)
results: False
negated: A = True
          Print (Not A)
results: False
in determining what the inside

Exercises subsequent updates

Guess you like

Origin www.cnblogs.com/zrxuexi/p/11272758.html