Extra practice with while loopsΒΆ

  1. Write a function oddsum(n) that will return the sum of all odd numbers from 1 to n.
  2. Modify oddsum so that it takes two parameters: oddsum(n,m) and returns the sum of all odd numbers from n to m.
  3. Write a function that will return the sum of all even numbers from 1 to n plus the product of all odd numbers from 1 to n. (viz., add up all the even numbers between 1 and n, multiply together all the odd numbers between 1 and then add those two values).
  4. Write a function that computes the value of the following mathematical expression

    System Message: WARNING/2 (\sum_{i=1}^n x \cdot \frac{1-x^n}{1-x})

    latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt fmtutil: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ ... This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) (INITEX) restricted \write18 enabled. (/opt/csw/share/texmf/web2c/cp227.tcx) entering extended mode (/opt/csw/share/texmf-dist/tex/latex/latexconfig/latex.ini (/opt/csw/share/texmf/tex/generic/config/pdftexconfig.tex) (/opt/csw/share/texmf-dist/tex/latex/base/latex.ltx (/opt/csw/share/texmf-dist/tex/latex/base/texsys.cfg) ./texsys.aux found \@currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, LaTeX2e <2011/06/27> hacks, control, par, spacing, files, font encodings, lengths, ==================================== Local config file fonttext.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/ot1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/omsenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmss.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmtt.fd))) ==================================== Local config file fontmath.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlcmm.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omscmsy.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omxcmex.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ucmr.fd))) ==================================== Local config file preload.cfg used ===================================== (/opt/csw/share/texmf-dist/tex/latex/base/preload.cfg (/opt/csw/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions, boxes, title, sectioning, contents, floats, footnotes, index, bibliography, output, =========================================== Local configuration file hyphen.cfg used =========================================== (/opt/csw/share/texmf-dist/tex/generic/babel/hyphen.cfg (/opt/csw/share/texmf/tex/generic/hyphen/hyphen.tex) (/opt/csw/share/texmf/tex/generic/hyphen/dumyhyph.tex) (/opt/csw/share/texmf/tex/generic/hyphen/zerohyph.tex) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.pat German Hyphenation Patterns (Traditional Orthography) `dehypht-x’ 2012-05-30 (W L))) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.pat German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x’ 2012-05-30 (WL))) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex EC Afrikaans hyphenation patterns (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.tex) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex)) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex Hyphenation patterns for Ancient Greek ! I can’t find file `grahyph5.tex’. l.30 \input grahyph5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. l.30 \input grahyph5.tex No pages of output. Transcript written on latex.log. Error: `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ failed ############################################################################### fmtutil: Error! Not all formats have been built successfully. Visit the log files in directory /csd/thesis/jhughe54/.texmf-var/web2c for details. ############################################################################### This is a summary of all `failed’ messages: `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ failed warning: kpathsea: mktexfmt output `This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) (INITEX) restricted \write18 enabled. (/opt/csw/share/texmf/web2c/cp227.tcx) entering extended mode (/opt/csw/share/texmf-dist/tex/latex/latexconfig/latex.ini (/opt/csw/share/texmf/tex/generic/config/pdftexconfig.tex) (/opt/csw/share/texmf-dist/tex/latex/base/latex.ltx (/opt/csw/share/texmf-dist/tex/latex/base/texsys.cfg) ./texsys.aux found \@currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, LaTeX2e <2011/06/27> hacks, control, par, spacing, files, font encodings, lengths, ==================================== Local config file fonttext.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/ot1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/omsenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmss.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmtt.fd))) ==================================== Local config file fontmath.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlcmm.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omscmsy.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omxcmex.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ucmr.fd))) ==================================== Local config file preload.cfg used ===================================== (/opt/csw/share/texmf-dist/tex/latex/base/preload.cfg (/opt/csw/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions, boxes, title, sectioning, contents, floats, footnotes, index, bibliography, output, =========================================== Local configuration file hyphen.cfg used =========================================== (/opt/csw/share/texmf-dist/tex/generic/babel/hyphen.cfg (/opt/csw/share/texmf/tex/generic/hyphen/hyphen.tex) (/opt/csw/share/texmf/tex/generic/hyphen/dumyhyph.tex) (/opt/csw/share/texmf/tex/generic/hyphen/zerohyph.tex) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.pat German Hyphenation Patterns (Traditional Orthography) `dehypht-x’ 2012-05-30 (W L))) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.pat German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x’ 2012-05-30 (WL))) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex EC Afrikaans hyphenation patterns (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.tex) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex)) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex Hyphenation patterns for Ancient Greek ! I can’t find file `grahyph5.tex’. l.30 \input grahyph5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. l.30 \input grahyph5.tex No pages of output. Transcript written on latex.log.’ instead of a filename. [stdout] This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) restricted \write18 enabled. I can’t find the format file `latex.fmt’!
    . The function will take two parameters: n and x.
  5. Write a function that computes the value of the following mathematical expression

    System Message: WARNING/2 (\sum_{i=0}^n \frac{x^i}{i!})

    latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt fmtutil: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ ... This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) (INITEX) restricted \write18 enabled. (/opt/csw/share/texmf/web2c/cp227.tcx) entering extended mode (/opt/csw/share/texmf-dist/tex/latex/latexconfig/latex.ini (/opt/csw/share/texmf/tex/generic/config/pdftexconfig.tex) (/opt/csw/share/texmf-dist/tex/latex/base/latex.ltx (/opt/csw/share/texmf-dist/tex/latex/base/texsys.cfg) ./texsys.aux found \@currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, LaTeX2e <2011/06/27> hacks, control, par, spacing, files, font encodings, lengths, ==================================== Local config file fonttext.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/ot1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/omsenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmss.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmtt.fd))) ==================================== Local config file fontmath.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlcmm.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omscmsy.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omxcmex.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ucmr.fd))) ==================================== Local config file preload.cfg used ===================================== (/opt/csw/share/texmf-dist/tex/latex/base/preload.cfg (/opt/csw/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions, boxes, title, sectioning, contents, floats, footnotes, index, bibliography, output, =========================================== Local configuration file hyphen.cfg used =========================================== (/opt/csw/share/texmf-dist/tex/generic/babel/hyphen.cfg (/opt/csw/share/texmf/tex/generic/hyphen/hyphen.tex) (/opt/csw/share/texmf/tex/generic/hyphen/dumyhyph.tex) (/opt/csw/share/texmf/tex/generic/hyphen/zerohyph.tex) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.pat German Hyphenation Patterns (Traditional Orthography) `dehypht-x’ 2012-05-30 (W L))) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.pat German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x’ 2012-05-30 (WL))) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex EC Afrikaans hyphenation patterns (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.tex) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex)) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex Hyphenation patterns for Ancient Greek ! I can’t find file `grahyph5.tex’. l.30 \input grahyph5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. l.30 \input grahyph5.tex No pages of output. Transcript written on latex.log. Error: `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ failed ############################################################################### fmtutil: Error! Not all formats have been built successfully. Visit the log files in directory /csd/thesis/jhughe54/.texmf-var/web2c for details. ############################################################################### This is a summary of all `failed’ messages: `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ failed warning: kpathsea: mktexfmt output `This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) (INITEX) restricted \write18 enabled. (/opt/csw/share/texmf/web2c/cp227.tcx) entering extended mode (/opt/csw/share/texmf-dist/tex/latex/latexconfig/latex.ini (/opt/csw/share/texmf/tex/generic/config/pdftexconfig.tex) (/opt/csw/share/texmf-dist/tex/latex/base/latex.ltx (/opt/csw/share/texmf-dist/tex/latex/base/texsys.cfg) ./texsys.aux found \@currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, LaTeX2e <2011/06/27> hacks, control, par, spacing, files, font encodings, lengths, ==================================== Local config file fonttext.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/ot1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/omsenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmss.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmtt.fd))) ==================================== Local config file fontmath.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlcmm.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omscmsy.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omxcmex.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ucmr.fd))) ==================================== Local config file preload.cfg used ===================================== (/opt/csw/share/texmf-dist/tex/latex/base/preload.cfg (/opt/csw/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions, boxes, title, sectioning, contents, floats, footnotes, index, bibliography, output, =========================================== Local configuration file hyphen.cfg used =========================================== (/opt/csw/share/texmf-dist/tex/generic/babel/hyphen.cfg (/opt/csw/share/texmf/tex/generic/hyphen/hyphen.tex) (/opt/csw/share/texmf/tex/generic/hyphen/dumyhyph.tex) (/opt/csw/share/texmf/tex/generic/hyphen/zerohyph.tex) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.pat German Hyphenation Patterns (Traditional Orthography) `dehypht-x’ 2012-05-30 (W L))) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.pat German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x’ 2012-05-30 (WL))) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex EC Afrikaans hyphenation patterns (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.tex) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex)) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex Hyphenation patterns for Ancient Greek ! I can’t find file `grahyph5.tex’. l.30 \input grahyph5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. l.30 \input grahyph5.tex No pages of output. Transcript written on latex.log.’ instead of a filename. [stdout] This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) restricted \write18 enabled. I can’t find the format file `latex.fmt’!
    . Remember that ! denotes the _factorial_ function (which you’ve already seen as the dostuff function in Lecture #6).
  6. Write a function isprime(n) that returns True if n is prime and False otherwise. Remember that a number is prime if it is divisible by 1 and itself and nothing else.
  7. Write a function primes_less_than(p) that will print out all of the prime numbers (greater than 1 and) less than p.
  8. Write a function rand_loop(cutoff) that will return a count of how many times the interpreter makes it through a special loop. The loop condition will be the following expression numpy.random.rand() < cutoff. You will need to import numpy in your code. The random.rand() function generates a random number between 0 and 1, so the function parameter cutoff should be a floating point value between 0 and 1. In short: your function will generate a random number. If it’s less than the cutoff you’ll increment a counter and go through the loop again. If it’s equal to, or bigger than, the cutoff, you stop looping and return the count. Play with the function a bit to find a relationship between your choice of cutoff and the number of times your function makes it through the loop.
  9. Write a function mult_table(n) that will print out an

    System Message: WARNING/2 (n \times n)

    latex exited with error [stderr] kpathsea: Running mktexfmt latex.fmt fmtutil: running `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ ... This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) (INITEX) restricted \write18 enabled. (/opt/csw/share/texmf/web2c/cp227.tcx) entering extended mode (/opt/csw/share/texmf-dist/tex/latex/latexconfig/latex.ini (/opt/csw/share/texmf/tex/generic/config/pdftexconfig.tex) (/opt/csw/share/texmf-dist/tex/latex/base/latex.ltx (/opt/csw/share/texmf-dist/tex/latex/base/texsys.cfg) ./texsys.aux found \@currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, LaTeX2e <2011/06/27> hacks, control, par, spacing, files, font encodings, lengths, ==================================== Local config file fonttext.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/ot1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/omsenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmss.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmtt.fd))) ==================================== Local config file fontmath.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlcmm.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omscmsy.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omxcmex.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ucmr.fd))) ==================================== Local config file preload.cfg used ===================================== (/opt/csw/share/texmf-dist/tex/latex/base/preload.cfg (/opt/csw/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions, boxes, title, sectioning, contents, floats, footnotes, index, bibliography, output, =========================================== Local configuration file hyphen.cfg used =========================================== (/opt/csw/share/texmf-dist/tex/generic/babel/hyphen.cfg (/opt/csw/share/texmf/tex/generic/hyphen/hyphen.tex) (/opt/csw/share/texmf/tex/generic/hyphen/dumyhyph.tex) (/opt/csw/share/texmf/tex/generic/hyphen/zerohyph.tex) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.pat German Hyphenation Patterns (Traditional Orthography) `dehypht-x’ 2012-05-30 (W L))) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.pat German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x’ 2012-05-30 (WL))) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex EC Afrikaans hyphenation patterns (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.tex) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex)) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex Hyphenation patterns for Ancient Greek ! I can’t find file `grahyph5.tex’. l.30 \input grahyph5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. l.30 \input grahyph5.tex No pages of output. Transcript written on latex.log. Error: `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ failed ############################################################################### fmtutil: Error! Not all formats have been built successfully. Visit the log files in directory /csd/thesis/jhughe54/.texmf-var/web2c for details. ############################################################################### This is a summary of all `failed’ messages: `pdftex -ini -jobname=latex -progname=latex -translate-file=cp227.tcx *latex.ini’ failed warning: kpathsea: mktexfmt output `This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) (INITEX) restricted \write18 enabled. (/opt/csw/share/texmf/web2c/cp227.tcx) entering extended mode (/opt/csw/share/texmf-dist/tex/latex/latexconfig/latex.ini (/opt/csw/share/texmf/tex/generic/config/pdftexconfig.tex) (/opt/csw/share/texmf-dist/tex/latex/base/latex.ltx (/opt/csw/share/texmf-dist/tex/latex/base/texsys.cfg) ./texsys.aux found \@currdir set to: ./. Assuming \openin and \input have the same search path. Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2, parameters, LaTeX2e <2011/06/27> hacks, control, par, spacing, files, font encodings, lengths, ==================================== Local config file fonttext.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fonttext.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/ot1enc.def) (/opt/csw/share/texmf-dist/tex/latex/base/omsenc.def) (/opt/csw/share/texmf-dist/tex/latex/base/t1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmr.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmss.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ot1cmtt.fd))) ==================================== Local config file fontmath.cfg used ==================================== (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.cfg (/opt/csw/share/texmf-dist/tex/latex/base/fontmath.ltx === Don’t modify this file, use a .cfg file instead === (/opt/csw/share/texmf-dist/tex/latex/base/omlcmm.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omscmsy.fd) (/opt/csw/share/texmf-dist/tex/latex/base/omxcmex.fd) (/opt/csw/share/texmf-dist/tex/latex/base/ucmr.fd))) ==================================== Local config file preload.cfg used ===================================== (/opt/csw/share/texmf-dist/tex/latex/base/preload.cfg (/opt/csw/share/texmf-dist/tex/latex/base/preload.ltx)) page nos., x-ref, environments, center, verbatim, math definitions, boxes, title, sectioning, contents, floats, footnotes, index, bibliography, output, =========================================== Local configuration file hyphen.cfg used =========================================== (/opt/csw/share/texmf-dist/tex/generic/babel/hyphen.cfg (/opt/csw/share/texmf/tex/generic/hyphen/hyphen.tex) (/opt/csw/share/texmf/tex/generic/hyphen/dumyhyph.tex) (/opt/csw/share/texmf/tex/generic/hyphen/zerohyph.tex) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehypht-x-2012-05-30.pat German Hyphenation Patterns (Traditional Orthography) `dehypht-x’ 2012-05-30 (W L))) (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.tex dehyph-exptl: using an 8-bit TeX engine. (/opt/csw/share/texmf-dist/tex/generic/dehyph-exptl/dehyphn-x-2012-05-30.pat German Hyphenation Patterns (Reformed Orthography, 2006) `dehyphn-x’ 2012-05-30 (WL))) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-af.tex EC Afrikaans hyphenation patterns (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/conversions/conv-utf8-ec.tex) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex)) (/opt/csw/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-grc.tex Hyphenation patterns for Ancient Greek ! I can’t find file `grahyph5.tex’. l.30 \input grahyph5.tex (Press Enter to retry, or Control-D to exit) Please type another input file name: ! Emergency stop. l.30 \input grahyph5.tex No pages of output. Transcript written on latex.log.’ instead of a filename. [stdout] This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/OpenCSW) restricted \write18 enabled. I can’t find the format file `latex.fmt’!
    multiplication table for the values 1 to n. Hint: you can nest if statements... can you nest while loops?