##1, Program analysis
Chess is 8*8 Of ,i(07) Representative bank ,j(07) Representative column . When i+j When it's odd , It's a black check , conversely , White check .

##2, Program implementation

<> Method 1 : Double cycle

(1) program :
for i in range(8): for j in range(8): if (i+j)%2!=0: print(chr(219)*2,end='')
else: print(' ',end='') print('')
(2) Effect display :

<> Method 2 : Circular printing of elements

(1) program
# Realize the circular movement of string def MoveLeft(string,n): n1=abs(n) length=len(string) n1= n1%length
# Number of cyclic shifts if n==0: # Do not move return string elif n<0: # Move left
string_n=string[n1:]+string[0:n1] else: # Move right
string_n=string[(length-n1):]+string[0:(length-n1)] return string_n #a='123456'
#b=MoveLeft(a,1) #print(b) def main(): a=' 11 11 11 11' i=0 while i<8: print(a)
a=MoveLeft(a,-2) i+=1 main()
(2) Experimental effect

(3) Program analysis
Method 2 uses the method of string cyclic movement , Compared with method one, it is more convenient

Technology
©2019-2020 Toolsou All rights reserved,
1190 Reverses the substring between each pair of parentheses leetcodemysql Joint index details You don't know ——HarmonyOS Create data mysql Library process Character recognition technology of vehicle license plate based on Neural Network A guess number of small games , use JavaScript realization Talking about uni-app Page value transfer problem pytorch of ResNet18( Yes cifar10 The accuracy of data classification is achieved 94%)C++ Method of detecting memory leak One is called “ Asking for the train ” A small village Finally got the train