Пример #1
0
_sage_const_18 = Integer(18)
_sage_const_50 = Integer(50)
_sage_const_123 = Integer(123)
_sage_const_125 = Integer(125)
_sage_const_100 = Integer(100)
_sage_const_102 = Integer(102)
_sage_const_104 = Integer(104)
_sage_const_107 = Integer(107)
_sage_const_300 = Integer(300)
_sage_const_1000 = Integer(1000)
_sage_const_128 = Integer(128)
_sage_const_16 = Integer(
    16
)  ## This file (hw3outMadison.sage) was *autogenerated* from the file hw3outMadison.tex.
import sagetex
_st_ = sagetex.SageTeXProcessor('hw3outMadison')
_st_.blockbegin()
try:
    from random import randint
    import random
    from datetime import datetime
    random.seed(datetime.now())
    import numpy as np
    var('A,B,C,D')
except:
    _st_.goboom(_sage_const_67)
_st_.blockend()
_st_.blockbegin()
try:
    A = randint(_sage_const_10, _sage_const_100)
    B = randint(_sage_const_10, _sage_const_200)
_sage_const_0p7 = RealNumber('0.7')
_sage_const_151 = Integer(151)
_sage_const_16 = Integer(16)
_sage_const_54 = Integer(54)
_sage_const_35 = Integer(35)
_sage_const_125 = Integer(125)
_sage_const_102 = Integer(102)
_sage_const_103 = Integer(103)
_sage_const_149 = Integer(149)
_sage_const_129 = Integer(129)
_sage_const_128 = Integer(
    128
)  ## This file (kiemtragiuaky.sagetex.sage) was *autogenerated* from kiemtragiuaky.tex with sagetex.sty version 2012/01/16 v2.3.3-69dcb0eb93de.
import sagetex
_st_ = sagetex.SageTeXProcessor('kiemtragiuaky',
                                version='2012/01/16 v2.3.3-69dcb0eb93de',
                                version_check=True)
_st_.blockbegin()
try:
    #f(x)=3*x*sin(x)-(x-2)^2
    __tmp__ = var("x")
    f = symbolic_expression(_sage_const_2 * x * cos(_sage_const_2 * x) -
                            (x - _sage_const_2)**_sage_const_2).function(x)
except:
    _st_.goboom(_sage_const_102)
_st_.blockend()
try:
    _st_.inline(_sage_const_0, latex(f(x)))
except:
    _st_.goboom(_sage_const_103)
_st_.blockbegin()
_sage_const_14 = Integer(14)
_sage_const_31 = Integer(31)
_sage_const_30 = Integer(30)
_sage_const_19 = Integer(19)
_sage_const_240 = Integer(240)
_sage_const_35 = Integer(35)
_sage_const_34 = Integer(34)
_sage_const_37 = Integer(37)
_sage_const_36 = Integer(36)
_sage_const_39 = Integer(39)
_sage_const_38 = Integer(
    38
)  ## This file (geom_tk4.sagetex.sage) was *autogenerated* from geom_tk4.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('geom_tk4',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_69
_st_.blockbegin()
try:
    var('x,y,z')
    M1 = zero_vector(_sage_const_3)
    M2 = M1
    M3 = M1
    a = M1
    b = M1
    p1 = zero_vector(_sage_const_4)
    p2 = p1
    # если направляющий вектор нулевой, перегенерируем
    while (M1 == M2) or (M1 == M3) or (M2 == M3) or (M1 == zero_vector(
            _sage_const_3)) or (M2 == zero_vector(_sage_const_3)) or (
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file determineTypeOfModel.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (determineTypeOfModel.sagetex.sage) was *autogenerated* from determineTypeOfModel.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('determineTypeOfModel', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

Пример #5
0
_sage_const_7 = Integer(7)
_sage_const_70 = Integer(70)
_sage_const_5 = Integer(5)
_sage_const_61 = Integer(61)
_sage_const_9 = Integer(9)
_sage_const_4 = Integer(4)
_sage_const_1 = Integer(1)
_sage_const_82 = Integer(82)
_sage_const_10 = Integer(10)
_sage_const_76 = Integer(76)
_sage_const_6 = Integer(
    6
)  ## This file (ComplexNumbers-Practice1.sagetex.sage) was *autogenerated* from ComplexNumbers-Practice1.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('ComplexNumbers-Practice1',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_9
_st_.blockbegin()
try:

    def RandInt(a, b):
        """ Returns a random integer in [`a`,`b`]. Note that `a` and `b` should be integers themselves to avoid unexpected behavior.
     """
        return QQ(randint(int(a), int(b)))
        # return choice(range(a,b+1))

    def NonZeroInt(b, c, avoid=[_sage_const_0]):
        """ Returns a random integer in [`b`,`c`] which is not in `av`.
         If `av` is not specified, defaults to a non-zero integer.
     """
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file curve_sketching.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (curve_sketching.sagetex.sage) was *autogenerated* from curve_sketching.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('curve_sketching', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

_sage_const_1 = Integer(1)
_sage_const_0 = Integer(0)
_sage_const_2 = Integer(2)
_sage_const_100 = Integer(100)
_sage_const_42 = Integer(42)
_sage_const_13 = Integer(13)
_sage_const_12 = Integer(12)
_sage_const_20 = Integer(20)
_sage_const_32 = Integer(32)
_sage_const_36 = Integer(
    36
)  ## This file (answer-3.sagetex.sage) was *autogenerated* from answer-3.tex with sagetex.sty version 2012/01/16 v2.3.3-69dcb0eb93de.
import sagetex

_st_ = sagetex.SageTeXProcessor('answer-3',
                                version='2012/01/16 v2.3.3-69dcb0eb93de',
                                version_check=True)
try:
    _st_.inline(_sage_const_0, latex(factor(_sage_const_2016)))
except:
    _st_.goboom(_sage_const_12)
try:
    _st_.inline(_sage_const_1, latex(factor(_sage_const_2017)))
except:
    _st_.goboom(_sage_const_13)
try:
    _st_.plot(_sage_const_0,
              format='notprovided',
              _p_=plot(sin(x**_sage_const_2), _sage_const_0, pi))
except:
    _st_.goboom(_sage_const_20)
Пример #8
0
_sage_const_103 = Integer(103)
_sage_const_8 = Integer(8)
_sage_const_99 = Integer(99)
_sage_const_123 = Integer(123)
_sage_const_94 = Integer(94)
_sage_const_110 = Integer(110)
_sage_const_125 = Integer(125)
_sage_const_10 = Integer(10)
_sage_const_112 = Integer(112)
_sage_const_33 = Integer(33)
_sage_const_114 = Integer(
    114
)  ## This file (quadraticFormula.sagetex.sage) was *autogenerated* from quadraticFormula.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('quadraticFormula',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_33
_st_.blockbegin()
try:
    x = var("x")

    ################################
    def maybeMakeNegative(natural):
        integer = natural * (-_sage_const_1)**ZZ.random_element(_sage_const_2)
        return integer

    def generateCoefficients():
        a = maybeMakeNegative(ZZ.random_element(_sage_const_2, _sage_const_10))
        b = maybeMakeNegative(ZZ.random_element(_sage_const_2, _sage_const_10))
        c = maybeMakeNegative(ZZ.random_element(_sage_const_2, _sage_const_10))
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file derivrules.sagetex.sage
from sage.all_cmdline import *  # import sage library

## This file (derivrules.sagetex.sage) was *autogenerated* from derivrules.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('derivrules',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.endofdoc()
Пример #10
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file rational.sagetex.sage
from sage.all_cmdline import *  # import sage library

## This file (rational.sagetex.sage) was *autogenerated* from rational.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('rational',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.endofdoc()
Пример #11
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file module6ObjectivesList.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (module6ObjectivesList.sagetex.sage) was *autogenerated* from module6ObjectivesList.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('module6ObjectivesList', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

Пример #12
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file error_propogation.sagetex.sage
from sage.all_cmdline import *   # import sage library

_sage_const_122 = Integer(122); _sage_const_3 = Integer(3); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_168 = Integer(168); _sage_const_2 = Integer(2); _sage_const_4 = Integer(4); _sage_const_161 = Integer(161); _sage_const_175 = Integer(175)## This file (error_propogation.sagetex.sage) was *autogenerated* from error_propogation.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('error_propogation', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.current_tex_line = _sage_const_122 
_st_.blockbegin()
try:
 def trilateration_eqn_npods(n):
     if n < _sage_const_3 :
         return "You can't TRIlaterate with less than 3, dummy"
 
     x, y = var('x', 'y')
 
     x_loc = list(var('x_{}'.format(i)) for i in range(_sage_const_1 , n + _sage_const_1 ))
     y_loc = list(var('y_{}'.format(i)) for i in range(_sage_const_1 , n + _sage_const_1 ))
     r = list(var('r_{}'.format(i)) for i in range(_sage_const_1 , n + _sage_const_1 ))
 
     if n == _sage_const_3 :
         distance_equations = []
 
         for i in range(_sage_const_1 , n):
             distance_equations.append(-_sage_const_2  * x * (x_loc[i - _sage_const_1 ] - x_loc[i]) \
                                       -_sage_const_2  * y * (y_loc[i - _sage_const_1 ] - y_loc[i]) == \
                                       r[i - _sage_const_1 ] ** _sage_const_2  - r[i] ** _sage_const_2 \
                                       - x_loc[i - _sage_const_1 ] ** _sage_const_2  + x_loc[i] ** _sage_const_2 \
                                       - y_loc[i - _sage_const_1 ]** _sage_const_2  + y_loc[i] ** _sage_const_2 )
 
Пример #13
0
_sage_const_126 = Integer(126)
_sage_const_127 = Integer(127)
_sage_const_124 = Integer(124)
_sage_const_125 = Integer(125)
_sage_const_95 = Integer(95)
_sage_const_144 = Integer(144)
_sage_const_146 = Integer(146)
_sage_const_147 = Integer(147)
_sage_const_148 = Integer(148)
_sage_const_149 = Integer(
    149
)  ## This file (algebraOfFunctions-Practice1.sagetex.sage) was *autogenerated* from algebraOfFunctions-Practice1.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex

_st_ = sagetex.SageTeXProcessor('algebraOfFunctions-Practice1',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_1
_st_.blockbegin()
try:

    ######  Define a function to convert a sage number into a saved counter number.

    #####Define default Sage variables.
    #Default function variables
    var('x,y,z,X,Y,Z')
    #Default function names
    var('f,g,h,dx,dy,dz,dh,df')
    #Default Wild cards
    w0 = SR.wild(_sage_const_0)
Пример #14
0
_sage_const_38 = Integer(38)
_sage_const_99 = Integer(99)
_sage_const_39 = Integer(39)
_sage_const_40 = Integer(40)
_sage_const_41 = Integer(41)
_sage_const_100 = Integer(100)
_sage_const_43 = Integer(43)
_sage_const_44 = Integer(44)
_sage_const_101 = Integer(101)
_sage_const_102 = Integer(102)
_sage_const_103 = Integer(
    103
)  ## This file (HW4.sagetex.sage) was *autogenerated* from HW4.tex with sagetex.sty version 2020/08/12 v3.5.
import sagetex
_st_ = sagetex.SageTeXProcessor('HW4',
                                version='2020/08/12 v3.5',
                                version_check=True)
_st_.current_tex_line = _sage_const_22
_st_.blockbegin()
try:
    a, b, c, u, v = var('a,b,c,u,v')
    c1 = a * sin(u) * cos(v)
    c2 = b * sin(u) * sin(v)
    c3 = c * cos(u)

except:
    _st_.goboom(_sage_const_27)
_st_.blockend()
try:
    _st_.current_tex_line = _sage_const_30
    _st_.inline(_sage_const_0, latex(diff(c1, u)))
Пример #15
0
_sage_const_101 = Integer(101)
_sage_const_102 = Integer(102)
_sage_const_38 = Integer(38)
_sage_const_162 = Integer(162)
_sage_const_163 = Integer(163)
_sage_const_95 = Integer(95)
_sage_const_94 = Integer(94)
_sage_const_146 = Integer(146)
_sage_const_186 = Integer(186)
_sage_const_128 = Integer(
    128
)  ## This file (functionNotation-Practice1.sagetex.sage) was *autogenerated* from functionNotation-Practice1.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex

_st_ = sagetex.SageTeXProcessor('functionNotation-Practice1',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_1
_st_.blockbegin()
try:

    ######  Define a function to convert a sage number into a saved counter number.

    #####Define default Sage variables.
    #Default function variables
    var('x,y,z,X,Y,Z')
    #Default function names
    var('f,g,h,dx,dy,dz,dh,df')
    #Default Wild cards
    w0 = SR.wild(_sage_const_0)
_sage_const_31 = Integer(31)
_sage_const_30 = Integer(30)
_sage_const_33 = Integer(33)
_sage_const_32 = Integer(32)
_sage_const_35 = Integer(35)
_sage_const_34 = Integer(34)
_sage_const_37 = Integer(37)
_sage_const_36 = Integer(36)
_sage_const_168 = Integer(168)
_sage_const_164 = Integer(164)
_sage_const_162 = Integer(
    162
)  ## This file (domainRationalFunctions.sagetex.sage) was *autogenerated* from domainRationalFunctions.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('domainRationalFunctions',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_30
_st_.blockbegin()
try:
    R, x = QQ['x'].objgen()

    def maybeMakeNegative(natural):
        integer = natural * (-_sage_const_1)**ZZ.random_element(_sage_const_2)
        return integer

    def makeIntegerFactor():
        zero = maybeMakeNegative(
            ZZ.random_element(_sage_const_1, _sage_const_6))
        integerFactor = x - zero
        return [integerFactor, zero]
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file coefficientsFactoring-Practice1.sagetex.sage
from sage.all_cmdline import *   # import sage library

_sage_const_40 = Integer(40); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_7 = Integer(7); _sage_const_6 = Integer(6); _sage_const_5 = Integer(5); _sage_const_4 = Integer(4); _sage_const_3 = Integer(3); _sage_const_49 = Integer(49); _sage_const_9 = Integer(9); _sage_const_8 = Integer(8); _sage_const_117 = Integer(117); _sage_const_11 = Integer(11); _sage_const_10 = Integer(10); _sage_const_58 = Integer(58); _sage_const_67 = Integer(67); _sage_const_35 = Integer(35)## This file (coefficientsFactoring-Practice1.sagetex.sage) was *autogenerated* from coefficientsFactoring-Practice1.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('coefficientsFactoring-Practice1', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.current_tex_line = _sage_const_1 
_st_.blockbegin()
try:
 
 ######  Define a function to convert a sage number into a saved counter number.
 
 # Work in Progress.
 #def setCounter(counterName, counterValue, fileName = 'counters.tex'):
 #    file1 = open(fileName, 'w')
 #    counterString = str(r'\setcounter{' + str(counterName) + '}{'+ str(counterValue) +'}')
 #    commandString = str('\\newcommand{\\' + str(counterName) + '}{'+ str(counterValue) +'}')
 #    file1.write(counterString + "\n" + commandString + "\n")
 #    # more "string# =" and "file#.write()" as desired.
 
 
 
 #####Define default Sage variables.
 #Default function variables
 var('x,y,z,X,Y,Z')
 #Default function names
 var('f,g,h,dx,dy,dz,dh,df')
 #Default Wild cards
 w0 = SR.wild(_sage_const_0 )
Пример #18
0
_sage_const_316 = Integer(316)
_sage_const_276 = Integer(276)
_sage_const_274 = Integer(274)
_sage_const_337 = Integer(337)
_sage_const_335 = Integer(335)
_sage_const_194 = Integer(194)
_sage_const_219 = Integer(219)
_sage_const_257 = Integer(257)
_sage_const_11 = Integer(11)
_sage_const_10 = Integer(10)
_sage_const_30 = Integer(
    30
)  ## This file (endAndZeroBehavior.sagetex.sage) was *autogenerated* from endAndZeroBehavior.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('endAndZeroBehavior',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_30
_st_.blockbegin()
try:
    x = var("x")

    def maybeMakeNegative(natural):
        integer = (-_sage_const_1)**ZZ.random_element(_sage_const_2)
        return integer

    def listZeros(factor1, factor2):
        z0 = factor1
        z1 = -factor1
        z2 = factor2
        z3 = -factor2
Пример #19
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file Exam1Practice.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (Exam1Practice.sagetex.sage) was *autogenerated* from Exam1Practice.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('Exam1Practice', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

_sage_const_10 = Integer(10)
_sage_const_17 = Integer(17)
_sage_const_16 = Integer(16)
_sage_const_15 = Integer(15)
_sage_const_14 = Integer(14)
_sage_const_19 = Integer(19)
_sage_const_32 = Integer(32)
_sage_const_71 = Integer(71)
_sage_const_125 = Integer(125)
_sage_const_129 = Integer(129)
_sage_const_79 = Integer(
    79
)  ## This file (operateOnComplexNumbers.sagetex.sage) was *autogenerated* from operateOnComplexNumbers.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('operateOnComplexNumbers',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_32
_st_.blockbegin()
try:

    def maybeMakeNegative(rational):
        maybeNegative = (-_sage_const_1)**ZZ.random_element(_sage_const_2)
        rational = maybeNegative * rational
        return rational

    def generateProblem():
        listIntegers = range(_sage_const_2, _sage_const_11)
        c0, c1, c2, c3 = sample(listIntegers, _sage_const_4)
        constants = [
            Integer(maybeMakeNegative(c0)),
_sage_const_50 = Integer(50)
_sage_const_0p1709 = RealNumber('0.1709')
_sage_const_167 = Integer(167)
_sage_const_370 = Integer(370)
_sage_const_162 = Integer(162)
_sage_const_9 = Integer(9)
_sage_const_18 = Integer(18)
_sage_const_0p8759 = RealNumber('0.8759')
_sage_const_142 = Integer(142)
_sage_const_14 = Integer(14)
_sage_const_249 = Integer(
    249
)  ## This file (thicuoiky1-dapan.sagetex.sage) was *autogenerated* from thicuoiky1-dapan.tex with sagetex.sty version 2012/01/16 v2.3.3-69dcb0eb93de.
import sagetex
_st_ = sagetex.SageTeXProcessor('thicuoiky1-dapan',
                                version='2012/01/16 v2.3.3-69dcb0eb93de',
                                version_check=True)
_st_.blockbegin()
try:
    __tmp__ = var("x")
    f4 = symbolic_expression(
        (x - _sage_const_1 / _sage_const_3)**_sage_const_2 *
        (x + _sage_const_2 / _sage_const_3)).function(x)
    x0 = _sage_const_1
    f4diff = diff(f4, x)
except:
    _st_.goboom(_sage_const_80)
_st_.blockend()
try:
    _st_.inline(_sage_const_0, latex(f4(x).expand()))
except:
Пример #22
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file eulers_method.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (eulers_method.sagetex.sage) was *autogenerated* from eulers_method.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('eulers_method', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

_sage_const_16 = Integer(16)
_sage_const_15 = Integer(15)
_sage_const_14 = Integer(14)
_sage_const_19 = Integer(19)
_sage_const_18 = Integer(18)
_sage_const_120 = Integer(120)
_sage_const_100 = Integer(100)
_sage_const_90 = Integer(90)
_sage_const_97 = Integer(97)
_sage_const_95 = Integer(95)
_sage_const_107 = Integer(
    107
)  ## This file (solvingExponentialEquations-Practice1.sagetex.sage) was *autogenerated* from solvingExponentialEquations-Practice1.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('solvingExponentialEquations-Practice1',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_1
_st_.blockbegin()
try:

    ######  Define a function to convert a sage number into a saved counter number.

    #####Define default Sage variables.
    #Default function variables
    var('x,y,z,X,Y,Z')
    #Default function names
    var('f,g,h,dx,dy,dz,dh,df')
    #Default Wild cards
    w0 = SR.wild(_sage_const_0)
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file series_tests.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (series_tests.sagetex.sage) was *autogenerated* from series_tests.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('series_tests', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

Пример #25
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file /media/archdoc/7636-BC29/improvedExamGeneration/M02Linear/Module2MU.sagetex.sage
from sage.all_cmdline import *   # import sage library

_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_7 = Integer(7); _sage_const_6 = Integer(6); _sage_const_5 = Integer(5); _sage_const_4 = Integer(4); _sage_const_43 = Integer(43); _sage_const_9 = Integer(9); _sage_const_8 = Integer(8); _sage_const_28 = Integer(28); _sage_const_29 = Integer(29); _sage_const_22 = Integer(22); _sage_const_23 = Integer(23); _sage_const_20 = Integer(20); _sage_const_21 = Integer(21); _sage_const_26 = Integer(26); _sage_const_19 = Integer(19); _sage_const_24 = Integer(24); _sage_const_25 = Integer(25); _sage_const_40 = Integer(40); _sage_const_41 = Integer(41); _sage_const_42 = Integer(42); _sage_const_65 = Integer(65); _sage_const_62 = Integer(62); _sage_const_45 = Integer(45); _sage_const_60 = Integer(60); _sage_const_47 = Integer(47); _sage_const_84 = Integer(84); _sage_const_87 = Integer(87); _sage_const_80 = Integer(80); _sage_const_27 = Integer(27); _sage_const_32 = Integer(32); _sage_const_13 = Integer(13); _sage_const_12 = Integer(12); _sage_const_11 = Integer(11); _sage_const_10 = Integer(10); _sage_const_17 = Integer(17); _sage_const_16 = Integer(16); _sage_const_15 = Integer(15); _sage_const_14 = Integer(14); _sage_const_31 = Integer(31); _sage_const_30 = Integer(30); _sage_const_33 = Integer(33); _sage_const_18 = Integer(18); _sage_const_35 = Integer(35); _sage_const_34 = Integer(34); _sage_const_37 = Integer(37); _sage_const_36 = Integer(36); _sage_const_39 = Integer(39); _sage_const_125 = Integer(125); _sage_const_110 = Integer(110); _sage_const_128 = Integer(128); _sage_const_38 = Integer(38); _sage_const_104 = Integer(104); _sage_const_107 = Integer(107); _sage_const_147 = Integer(147); _sage_const_44 = Integer(44); _sage_const_131 = Integer(131)## This file (Module2MU.sagetex.sage) was *autogenerated* from Module2MU.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('Module2MU', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.current_tex_line = _sage_const_33 
_st_.blockbegin()
try:
 load("../Code/generalPurposeMethods.sage")
 load("../Code/keyGeneration.sage")
except:
 _st_.goboom(_sage_const_36 )
_st_.blockend()
_st_.current_tex_line = _sage_const_42 
_st_.blockbegin()
try:
 moduleNumber = _sage_const_2 
 version = "MU"
 problemNumber = _sage_const_6 
 load("../Code/linear/linearTwoPoints.sage")
except:
 _st_.goboom(_sage_const_47 )
_st_.blockend()
try:
 _st_.current_tex_line = _sage_const_60 
 _st_.inline(_sage_const_0 , latex(displayStem))
except:
 _st_.goboom(_sage_const_60 )
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file identifyLinearNeed.sagetex.sage
from sage.all_cmdline import *  # import sage library

## This file (identifyLinearNeed.sagetex.sage) was *autogenerated* from identifyLinearNeed.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('identifyLinearNeed',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.endofdoc()
Пример #27
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file factoringRationalRootTheorem-Practice1.sagetex.sage
from sage.all_cmdline import *   # import sage library

_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_7 = Integer(7); _sage_const_89 = Integer(89); _sage_const_5 = Integer(5); _sage_const_67 = Integer(67); _sage_const_100 = Integer(100); _sage_const_43 = Integer(43); _sage_const_9 = Integer(9); _sage_const_4 = Integer(4); _sage_const_78 = Integer(78); _sage_const_95 = Integer(95); _sage_const_10 = Integer(10); _sage_const_6 = Integer(6)## This file (factoringRationalRootTheorem-Practice1.sagetex.sage) was *autogenerated* from factoringRationalRootTheorem-Practice1.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('factoringRationalRootTheorem-Practice1', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.current_tex_line = _sage_const_1 
_st_.blockbegin()
try:
 
 ######  Define a function to convert a sage number into a saved counter number.
 
 #####Define default Sage variables.
 #Default function variables
 var('x,y,z,X,Y,Z')
 #Default function names
 var('f,g,h,dx,dy,dz,dh,df')
 #Default Wild cards
 w0 = SR.wild(_sage_const_0 )
 
 def DispSign(b):
     """ Returns the string of the 'signed' version of `b`, e.g. 3 -> "+3", -3 -> "-3", 0 -> "".
     """
     if b == _sage_const_0 :
         return ""
     elif b > _sage_const_0 :
         return "+" + str(b)
     elif b < _sage_const_0 :
         return str(b)
Пример #28
0
_sage_const_1 = Integer(1)
_sage_const_200 = Integer(200)
_sage_const_100 = Integer(100)
_sage_const_86 = Integer(86)
_sage_const_90 = Integer(90)
_sage_const_79 = Integer(79)
_sage_const_82 = Integer(82)
_sage_const_94 = Integer(94)
_sage_const_10 = Integer(10)
_sage_const_300 = Integer(300)
_sage_const_0 = Integer(0)
_sage_const_50 = Integer(
    50
)  ## This file (hw1outAvery.sage) was *autogenerated* from the file hw1outAvery.tex.
import sagetex
_st_ = sagetex.SageTeXProcessor('hw1outAvery')
_st_.blockbegin()
try:
    from random import randint
    var('A,B,C,D')
    A = randint(_sage_const_10, _sage_const_100)
    B = randint(_sage_const_10, _sage_const_200)
    C = randint(_sage_const_10, _sage_const_300)
    D = randint(_sage_const_10, _sage_const_50)
except:
    _st_.goboom(_sage_const_79)
_st_.blockend()
try:
    _st_.inline(_sage_const_0, A)
except:
    _st_.goboom(_sage_const_82)
Пример #29
0
## -*- encoding: utf-8 -*-

# This file was *autogenerated* from the file Homework04.sagetex.sage
from sage.all_cmdline import *   # import sage library

## This file (Homework04.sagetex.sage) was *autogenerated* from Homework04.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('Homework04', version='2015/08/26 v3.0-92d9f7a', version_check=True)
_st_.endofdoc()

_sage_const_31 = Integer(31)
_sage_const_30 = Integer(30)
_sage_const_33 = Integer(33)
_sage_const_32 = Integer(32)
_sage_const_35 = Integer(35)
_sage_const_34 = Integer(34)
_sage_const_37 = Integer(37)
_sage_const_36 = Integer(36)
_sage_const_166 = Integer(166)
_sage_const_162 = Integer(162)
_sage_const_160 = Integer(
    160
)  ## This file (constructLinearModel.sagetex.sage) was *autogenerated* from constructLinearModel.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
import sagetex
_st_ = sagetex.SageTeXProcessor('constructLinearModel',
                                version='2015/08/26 v3.0-92d9f7a',
                                version_check=True)
_st_.current_tex_line = _sage_const_42
_st_.blockbegin()
try:
    x = var("x")
    fixedCost1 = ZZ.random_element(_sage_const_10,
                                   _sage_const_26) * _sage_const_1000
    productionCost1 = round(
        ZZ.random_element(_sage_const_1, _sage_const_4) * _sage_const_0p05,
        _sage_const_2)
    sellingPoint1 = round(
        productionCost1 * ZZ.random_element(_sage_const_1, _sage_const_4),
        _sage_const_2)
    costs1 = productionCost1 * x + fixedCost1
    profits1 = sellingPoint1 * x