In-depth optimization algorithm deep semantic understanding leader and professor
Solution for core technology: (Deep Learning)
for a in range(1,10):
for b in range(1,a+1):
print("{}x{}={}".format(a,b,a*b,),end=" ")
#format format string into each number and space
print(" ")
The for loop puts the variable a in the number from 1 to 9,
Variable b is within 1 to a+1, output a 1x1=1,
Print a space to wrap and get the output
After entering the a loop this time, a is now 2.
The variable b is within 1 to a+1,
Then enter the output again 2*1=2
Repeatedly, enter 2*2=4,
Then enter the traversal of 3,
The traversal of was born 3x1=3 3x2=6 3x3=9,
So enter the traversal of 4...
Until a is 9, the traversal is over,
So the question you might want to ask?
1.a+1 when a traverses to 9
Then I can add 10 to 10
So the largest expression is 9x10=90?
Answer: Because the traversal is within an array of 1 to 10,
So 10 itself does not contain,
If the following item is not added to this one,
He only counts nine times eight,
He would not see the index of nine multiplied by nine.
The first one is the same as the second one, which is also nine.
Nine plus one equals ten, and he won’t change to ten.
2. Why does calling a only count to 8,
If you don't add 1,
Why does b call a only traverse to 9?
Answer: Because the back a is equal to nine as shown in the figure
e_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2F1eWFo,size_16,color_FFFFFF,t_70)