#! /Usr/bin/Python
#-*-Coding: UTF-8 -*-
# Filename: helloworld. py
Print u'use single quotes to define string'
Print U "Using Double quotation marks to define strings"
Print u''' use three quotation marks to create a line feed
Row 2
Line 3 '''
Print u'use Escape Character \''
Print U' uses the end of the line \ to connect a long line of strings \
Too long string'
Print ur 'Use R to create a natural string filter escape character \''
Print U 'unicode delimiter'
Print u'two strings automatically connect to 'U' second string'
Print U' Welcome to China! Hello world \''
# VaR
I = 5
Print I
I = I + 1
Print I
S = ''' this is a multi-line string.
This is the second line .'''
Print s
S = u'create a logical row, not ending with a semicolon'
Print s
Print \
S
# Calc
Print 2 // 3
Print 20/3
Print 20 // 3
Print 20 /// 3.0
Print 20/3. 0
Print 2 <2
Print 3 <2
Print 4 <2
Print 3> 2
Print 4> 2
Print 5> 2
Print 6> 2
Print 5 & 3
Print 5 ^ 3
# The plus sign has a higher priority than the sum or sign.
Print 5 & 3 + 5 ^ 3 = 5 | 3
Print 5 & 3 + 5 ^ 3
Print (5 & 3) + (5 ^ 3)
Print 5 | 3
Print ~ 5
# Swap the value of X with the value of Y
X = 5
Y = 3
X = x ^ y
Y = y ^ x
X = x ^ y
Print x
Print y
X = ~ (~ 0 <4)
Y = x> 4
Print Y & X
# Cyclic shift
A = ~ 0
B = A <(8-4)
C = A> 4
C = C | B
Print C
A = 0xaa
B = A <(8-4)
C = A> 4
C = C | B
Print C,
A = 0x55
B = A <(8-4)
C = A> 4
C = C | B
Print C,