day-2 elementary data type

'' ' 
String
to the string 1. quotation marks collectively
2. single quotes may be double quotes. Marks required about three identical
3. strings may be added (Example a)
4 may want to take a string (Example b)
'' '
# ============================================ ==============================
# string
# Example I. adder strings
N1 = 'Alex'
N2 = "SB "
N3 =" "" ab & "" "
N4 = N1 + N2 + N3
Print (N4)
# according to the second multiplication string
A1. 8 =
A2 = 2
A3 = A1 * A2
Print (A3)
B1 = 'a' * . 8
Print (B1)
# ============================================ ==============================
# digital
# division
A4 = 100/10
Print (A4)
# index
a5 = 2 ** . 8
Print ( 'A5')
# Modulo
a6 = 39% 8
Print (A6)
# rounding
A7 = 39. 8 //
Print (A7)

Guess you like

Origin www.cnblogs.com/pythonzhao/p/11618565.html