Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. In[1]:= ListA = {6, 8, 9, 10}
  2. ListB = {4, 5, 6, 8, 10}
  3. ListC = {4, 6, 7, 8, 9}
  4. ListD = {5, 6, 7, 9, 10}
  5. Print["1.a)"]
  6. Print[Union[ListA, ListB, ListC, ListD]]
  7.  
  8. During evaluation of In[1]:= 1.a)
  9.  
  10. During evaluation of In[1]:= {4,5,6,7,8,9,10}
  11.  
  12. In[7]:= Print["b)"]
  13. Print[Intersection[ListA, ListB]]
  14.  
  15. During evaluation of In[7]:= b)
  16.  
  17. During evaluation of In[7]:= {6,8,10}
  18.  
  19. In[9]:= Print["c)"]
  20. Print[Complement[ListB, ListD]]
  21.  
  22. During evaluation of In[9]:= c)
  23.  
  24. During evaluation of In[9]:= {4,8}
  25.  
  26. In[3]:= Print["4."]
  27. For[i = 3001, i < 3032, i = i + 2, Print[i " ", PrimeQ[i]]]
  28.  
  29. During evaluation of In[3]:= 4.
  30.  
  31. During evaluation of In[3]:= 3001 True
  32.  
  33. During evaluation of In[3]:= 3003 False
  34.  
  35. During evaluation of In[3]:= 3005 False
  36.  
  37. During evaluation of In[3]:= 3007 False
  38.  
  39. During evaluation of In[3]:= 3009 False
  40.  
  41. During evaluation of In[3]:= 3011 True
  42.  
  43. During evaluation of In[3]:= 3013 False
  44.  
  45. During evaluation of In[3]:= 3015 False
  46.  
  47. During evaluation of In[3]:= 3017 False
  48.  
  49. During evaluation of In[3]:= 3019 True
  50.  
  51. During evaluation of In[3]:= 3021 False
  52.  
  53. During evaluation of In[3]:= 3023 True
  54.  
  55. During evaluation of In[3]:= 3025 False
  56.  
  57. During evaluation of In[3]:= 3027 False
  58.  
  59. During evaluation of In[3]:= 3029 False
  60.  
  61. During evaluation of In[3]:= 3031 False
  62.  
  63. In[5]:= Print[
  64. Factor[13 x^5 - 26 x^4 - 546 x^3 + 1924 x^2 - 299 x - 2730]]
  65.  
  66. During evaluation of In[5]:= 13 (-5+x) (-3+x) (-2+x) (1+x) (7+x)
  67.  
  68. 6.
  69. Solve[56 x^8 + 137 x^7 - 1266 x^6 - 3428 x^5 + 6232 x^4 + 18717 x^3 +
  70. 594 x^2 - 5562 x + 648 == 0, x]
  71.  
  72. {{x -> -3}, {x -> -3}, {x -> -3}, {x -> 1/8}, {x -> 3/7}, {x ->
  73. 4}, {x -> 1 - Sqrt[3]}, {x -> 1 + Sqrt[3]}}
  74.  
  75. 7.
  76. varX = Solve[x + y + 2 z == 56, x]
  77.  
  78. Out[10]= {{x -> 56 - y - 2 z}}
  79.  
  80. In[11]:= varY = Solve[x - 2 y - z == -22, y]
  81.  
  82. Out[11]= {{y -> 1/2 (22 + x - z)}}
  83.  
  84. In[12]:= varZ = Solve[2 x + 3 y + 4 z == 119, z]
  85.  
  86. Out[12]= {{z -> 1/4 (119 - 2 x - 3 y)}}
  87.  
  88. In[15]:= ProductXYZ = varX*varY*varZ
  89.  
  90. Out[15]= {{(x -> 56 - y - 2 z) (y -> 1/2 (22 + x - z)) (z ->
  91. 1/4 (119 - 2 x - 3 y))}}
  92.  
  93. In[24]:= 12.
  94. For[i = 1, i < 26, i++, Print[Prime[i]]]
  95.  
  96. During evaluation of In[24]:= 2
  97.  
  98. During evaluation of In[24]:= 3
  99.  
  100. During evaluation of In[24]:= 5
  101.  
  102. During evaluation of In[24]:= 7
  103.  
  104. During evaluation of In[24]:= 11
  105.  
  106. During evaluation of In[24]:= 13
  107.  
  108. During evaluation of In[24]:= 17
  109.  
  110. During evaluation of In[24]:= 19
  111.  
  112. During evaluation of In[24]:= 23
  113.  
  114. During evaluation of In[24]:= 29
  115.  
  116. During evaluation of In[24]:= 31
  117.  
  118. During evaluation of In[24]:= 37
  119.  
  120. During evaluation of In[24]:= 41
  121.  
  122. During evaluation of In[24]:= 43
  123.  
  124. During evaluation of In[24]:= 47
  125.  
  126. During evaluation of In[24]:= 53
  127.  
  128. During evaluation of In[24]:= 59
  129.  
  130. During evaluation of In[24]:= 61
  131.  
  132. During evaluation of In[24]:= 67
  133.  
  134. During evaluation of In[24]:= 71
  135.  
  136. During evaluation of In[24]:= 73
  137.  
  138. During evaluation of In[24]:= 79
  139.  
  140. During evaluation of In[24]:= 83
  141.  
  142. During evaluation of In[24]:= 89
  143.  
  144. During evaluation of In[24]:= 97
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement