plot summary:
[Machine Xiao Wei] in [engineer Ah Wei] escorted into the [nine turn elixir] of the turn of the practice. Imagine a scenario:
If you were allowed to take an Internet-connected computer to the college entrance exam, would you give up choosing a hand-held calculator and a draft book?
? Ah Wei decided and Xiao Wei to try to use the computer to calculate high questions will be how the feeling.
Drama Start:
Star Calendar May 20, 2016 11:40:58, the Milky Way Galaxy Earles the Chinese Empire Jiangnan Line province.
[Engineer Ah Wei] is working with [machine Xiao Wei] to do 2005 years of Jiangsu Province Mathematics college entrance exam questions].
Overall, the difficulty and the last year flat, are very kind,
But the last year a lot of questions are like a joke, this time slightly better, but the calculation is also very small.
Then the biggest change is to break the 22 pattern of the last n years, with the reduction of a subjective entitled cost, added two blank questions.
<span style= "FONT-SIZE:18PX;" >def tmp1 (): A = Set ([1, 2]); B = Set ([+ +]); C = Set ([2,3,4]); D = (a.intersection (B)). Union (C); Print (D); E = (A & B) | C; Print (E);>>> {1, 2, 3, 4}{1, 2, 3, 4}</span>
<span style= "FONT-SIZE:18PX;" >//2if (1) {var r = 20; Config.setsector (1,1,1,1); Config.graphpaper2d (0, 0, R); Config.axis2d (0, 0,180); Axis set var ScaleX = 2*r, ScaleY = 2*r; var SpaceX = 2, SpaceY = 2; var XS = -10, XE = 10; var YS = -20, YE = 20; Config.axisspacing (XS, XE, SpaceX, ScaleX, ' X '); Config.axisspacing (YS, YE, SpaceY, ScaleY, ' Y '); var transform = new transform (); Store the points on the function image var a = [], b = [], c = [], d = []; Function description//Greek alphabet to be displayed (save this for ctrl c/v//αβγδεζηθικλμνξ0πρστυφχψω//αβγδεζηθικλ Μνξοπρστυφχψωvar f1 = ' y = 2^[1-x]+3 's inverse function ', F2 = ' y = 2^[1-x]+3 ', F3 = ', F4 = '; var y1 = y2 = 0;//(x+2) ^2) ^0.5for (var x = XS; x <= XE; x+=0.2) {y1 = Math.pow (2, 1-x) +3;a.push ([Y1, X]); B.push ([x, Y1]); }//Store temporary array var tmp = []; Show transform if (A.length > 0) {a = Transform.scale (Transform.translate (A, 0, 0), scalex/s Pacex, Scaley/spacey); function 1 TMP = [].concat (a); Shape.pointdraw (TMP, ' red '); TMP = [].concat (a); Shape.multilinedraw (tmp, ' Pink '); Plot.setfillstyle (' Red '); Plot.filltext (F1, 100,-90, 200); }//Show transform if (B.length > 0) {b = Transform.scale (transform.translate (b, 0, 0 ), Scalex/spacex, Scaley/spacey); function 1 TMP = [].concat (b); Shape.pointdraw (TMP, ' BLue '); TMP = [].concat (b); Shape.multilinedraw (tmp, ' #2288FF '); Plot.setfillstyle (' Blue '); Plot.filltext (F2, 100,-120, 200); }} var f1 = ' Y = Math.log (2/(x-3))/math.log (2) ', F2 = ' y = 2^[1-x]+3 ', F3 = ', F4 = '; var y1 = y2 = 0;//(n (x+2) ^2) ^0.5for (var x = XS; x <= XE; x+=0.2) {y1 = Math.log (2/(x-3))/math.log (2) A.push ([x, Y1]) ; } </span>
<span style= "FONT-SIZE:18PX;" > #题4def tmp4 (): panel = panel (); #正三棱柱ABC-a1b1c1 A, B, C = [0, 0, 0], [2,0,0], [1, 3**0.5, 0]; A1, B1, C1 = [0, 0, 1], [2,0,1], [1, 3**0.5, 1]; #平面ABC的法向量 norm_abc = Panel.normal ([A, B, C]); Print (NORM_ABC); #平面ABC的一般式方程 genre_abc = Panel.genreform ([A, B, C]); Print (GENRE_ABC); #占A到平面A1BC的距离 DIS_A_A1BC = Panel.pt2panel (A, [A1, B, C]); Print (DIS_A_A1BC);>>> [0.0, 0, 3.4641016151377544][0.0, 0, 3.4641016151377544, -0.0]0.8660254037844386#### @ The plane class in the analytical geometry of the usage plane, containing a set of related calculation methods # @author mw# @date May 20, 2016 Friday 09:02:31 # @param # @return # # # # # # # # # # # # # #涉及到平面, all coordinate points are spatial coordinates system [x, Y, z] form class Panel (): #平面的法向量, determined by [p_[1], p_[2], p_[3]] unique flat def normal (self, plain): #平面上的三个点 poi Nt_1, point_2, point_3 = Plain[0], plain[1], plain[2]; X_1, y_1, z_1 = Point_1[0], point_1[1], point_1[2]; X_2, y_2, z_2 = Point_2[0], point_2[1], point_2[2]; X_3, y_3, z_3 = Point_3[0], point_3[1], point_3[2]; #中间变量 a = (y_2-y_1) * (z_3-z_1)-(y_3-y_1) * (z_2-z_1); b = (z_2-z_1) * (x_3-x_1)-(z_3-z_1) * (x_2-x_1); c = (x_2-x_1) * (y_3-y_1)-(x_3-x_1) * (y_2-y_1); return [A, b, c]; #平面一般式方程, the four parameters a,b,c,d def genreform (self, plain) are obtained from three flat pastry ax+by+cz+d=0: Norm = self.normal (plain); A, b, C = norm[0], norm[1], norm[2]; #平面上的三个点 point_1, point_2, point_3 = Plain[0], plain[1], plain[2]; X_1, y_1, z_1 = Point_1[0], point_1[1], point_1[2]; X_2, y_2, z_2 = Point_2[0], point_2[1], point_2[2]; X_3, y_3, z_3 = Point_3[0], point_3[1], point_3[2]; D =-(a*x_1+b*y_1+c*z_1); return [A, B, C, d]; #点到平面的距离 def pt2panel (self, point, Panel): #平面一般式的参数 A, B, c, d = self.genreform (panel); X, y, z = point[0], point[1], point[2]; Distance = ABS ((a*x+b*y+c*z+d)/(a**2+b**2+c**2) **0.5); Return distance;</span>
<span style= "FONT-SIZE:18PX;" > #题5def tmp5 (): #三角形ABC, give one more side trial calculation TRI_ABC = Geo.solvetriangle ([3, 2, '? ', '? '); Print (TRI_ABC); BC, AC, AB = Tri_abc[0], tri_abc[1], tri_abc[2]; #周长 perimeter = bc+ac+ab; print (perimeter); #角B, converted to radians B = Tri_abc[4]/180*math.pi; #选项, used to compare choice = [4*1.732*math.sin (B+MATH.PI/3) +3, 4*1.732*math.sin (B+MATH.PI/6) +3, 6*math.sin (B +MATH.PI/3) +3, 6*math.sin (B+MATH.PI/6) +3 ]; Answer = ' ABCD '; For I in range (4): If ABS (choice[i]-perimeter) < 1e-6: print (answer[i]);>>> [3, 2, 3.4494897427831783, 60.0, 35.264389682754654, 84.73561031724536]8.449489742783179d</span>
<span style= "FONT-SIZE:18PX;" >//7if (1) {analyze = new dataanalyze (); a = [9.4, 9.4, 9.4, 9.6, 9.7];hint (Analyze.average (a)); Hint (analyze.variance ( a));} 9.50.015999999999999886# 7def TMP7 (): Analyze = Dataanalyze (); Array = [9.4, 8.4, 9.4, 9.9, 9.6, 9.4, 9.7]; Array = sorted (array); Array = array[1:-1]; print (array); Array = Analyze.format (array); Sum_ = analyze.sum (array); Print (SUM_); Aver_ = analyze.average (array); Print (' mean ', aver_); Variance = analyze.variance (array); Print (' Variance ', variance); #numpy数组的属性 print (Array.ndim); Print (Array.shape); Print (array.size); Print (Array.dtype); Print (array.itemsize); Print (Array.data);>>> [9.4, 9.4, 9.4, 9.6, 9.7]47.5 mean 9.5 variance 0.0161 (5,) 5float648<memory at 0x0205ad50>### # @usage Centralized Analysis class # @author mw# @date May 20, 2016 Friday 10:06:47 # @param # @return # # # #class Dataanalyze (): #由于nump The method interface of Y is only open to Narray, so the array should be formatted first #对于自己的数组而言, this method must be called first, in order to use the NumPy method DEF format (self, array): Return Numpy.array (array); #求和 def sum (self, array): Return Array.sum (); #均值 def average (self, array): Return Self.sum (Array)/len (array); #方差 def variance (self, array): Array_ = Array*array; Sum_ = Array_.sum (); Aver_ = self.average (array); result = Sum_/len (array)-aver_**2; return result; #标准差 def RMS (self, Array): Return (self.variance) **0.5;</span>
<span style= "FONT-SIZE:18PX;" > #题9def tmp9 (): a = [' X ', ' 2 ']; A = Alg.strformat (a); A = Alg.strpow_n (A, 5); A = Alg.strcombine (a); Print (a);>>> [' (1) *x^[5] ', ' (Ten) *x^[4] ', ' (+) *x^[3] ', ' (+) *x^[2] ', ' () *x^[1] ', ' (+) ']</span>
<span style= "FONT-SIZE:18PX;" > #题16def tmp16 (): print (Math.log (0.618)/math.log (3));</span>
<span style= "FONT-SIZE:18PX;" > #题20def tmp20 (): #甲, B hit p_1 = 2/3; p_2 = 3/4; # (1) print (1-p_1**4); # (2) There is a combination number multiplied by a = Alg.combination (4, 2) *p_1**2* (1-p_1) **2; b = Alg.combination (4, 3) *p_2**3* (1-p_2); Print (a*b); # (3) A12 = N (1-p_2) **2; #前两次, as long as not all do not hit a3 = p_2; #第三次, you must hit A45 = (1-p_2) **2; #第四五次, you must not print (a12* A3*A45);>>> 0.80246913580246910.125000000000000030.0439453125</span>
<span style= "FONT-SIZE:18PX;" > #题21def tmp21 (): #已知边 as = AB = AE = 2; BC = DE = 1.732; #已知角 A = C = D = +; #解三角形, the array is tri_abs = Geo.solvetriangle (['? ', as, AB, '? '] in the opposite side of the diagonal); BS = tri_abs[0]; ES = BS; Tri_abe = Geo.solvetriangle (['? ', AE, AB, A, '? ', '? ']); be = tri_abe[0]; Tri_bes = Geo.solvetriangle ([ES, BS, be, '? ', '? ', '? ']); Print (' CD with AB angle: ', tri_bes[3]);>>> CD with AB angle: 52.23875609296496>>> math.acos (6**0.5/4) *180/ 3.14252.23198356916861>>> Math.acos (6**0.5/4) *180/math.pi52.23875609296496 # (2) #角B B = ( 540-a-c-d)/2; #tri_BCD = Geo.solvetriangle ([CD, '? ', BC, '? ', C, '? ']); Print (B); " " >>> CD with AB angle: 52.23875609296496 90.0 ' </span>
The end of this section, to know how to funeral, please see tell.
[Mathematics from the beginning] No. 214 quarter with a computer to the college Entrance Examination (VI)