\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{millyy} \pdfinfo{ /Title (milly.pdf) /Creator (Cheatography) /Author (millyy) /Subject (milly Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A32017} \definecolor{LightBackground}{HTML}{F9F1F0} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{milly Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{millyy} via \textcolor{DarkBackground}{\uline{cheatography.com/25849/cs/6974/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}millyy \\ \uline{cheatography.com/millyy} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 11th February, 2016.\\ Updated 10th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.28942 cm} x{2.68758 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Multiplication and Exponents}} \tn % Row 0 \SetRowColor{LightBackground} string * number & combine that string \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} string * string & Crash! \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} number * number & Multiply (Math) \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} string ** string & Crash! \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} number ** number & Exponent (Math) \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} string ** number & Crash! \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Conditionals}} \tn % Row 0 \SetRowColor{LightBackground} if..... & if the statement is true then do \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} :then.... & command under then else do \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} else.... & command under else \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} while..... & while this is true loop the command under the conditional \tn % Row Count 7 (+ 3) % Row 4 \SetRowColor{LightBackground} While True & loops forever \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} for each & For every item in the list repeat \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} item in name of list & the command under the loop that many times. (a string is a list too) \tn % Row Count 13 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{boolean}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{print (True) \newline % Row Count 1 (+ 1) print (2\textless{}3) \newline % Row Count 2 (+ 1) print (2 != 2)% Row Count 3 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{maxvalue}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{def max2(num1, num2): \newline maxvalue = num1 \newline if num2 \textgreater{} maxvalue: \newline maxvalue = num2 \newline return maxvalue \newline \newline print(max2(8,99)) \newline print(max2(5,6)) \newline \newline def max3(num1, num2, num3): \newline maxvalue = num2 \newline if num2 \textgreater{} maxvalue: \newline maxvalue = num2 \newline if num3 \textgreater{} maxvalue: \newline maxvalue = num3 \newline return maxvalue \newline \newline print(max3(1,2,3)) \newline print(max3(4,5,6)) \newline \newline def maxlist(list): \newline maxvalue = mylist{[}0{]} \newline \newline for item in mylist: \newline if item \textgreater{} maxvalue: \newline maxvalue = item \newline \newline return maxvalue \newline \newline mylist = {[}1,5,9,10,13{]} \newline print(maxlist(mylist))} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{palindrome}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{reverse = "" \newline letter\_num = 0 \newline \newline word = input('type in a word: ') \newline \newline while letter\_num \textless{} len(word): \newline reverse = word{[}letter\_num{]} + reverse \newline letter\_num = letter\_num + 1 \newline \newline if reverse == word: \newline print ("it is palindrome") \newline else: \newline print ("it is not palindrome")} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.38896 cm} x{2.58804 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Addition}} \tn % Row 0 \SetRowColor{LightBackground} string + string & combine together \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} string + number & crash! \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} number + number & addition (math) \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Example}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Print (2) - integer \newline % Row Count 1 (+ 1) Print (2.5) - floating point \newline % Row Count 2 (+ 1) Print ("Hello") - string \newline % Row Count 3 (+ 1) Print (mystr) - variable \newline % Row Count 4 (+ 1) Print (mystr, "Hi" ,2,1.0) - - commas \newline % Row Count 5 (+ 1) mystr = "Hi" \newline % Row Count 6 (+ 1) mystr \#name \newline % Row Count 7 (+ 1) "Hi" \#value can change \newline % Row Count 8 (+ 1) print (int(1.5)) \#1 \newline % Row Count 9 (+ 1) print (int("2")) \#2 \newline % Row Count 10 (+ 1) print (float(1)) \#1.0 anything to a float \newline % Row Count 11 (+ 1) Modulo/Remember \% \newline % Row Count 12 (+ 1) print (4\%2) \#0 \newline % Row Count 13 (+ 1) print (30\%7) \#2% Row Count 14 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{import random}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{import random \newline \newline intlist = {[}1,2,3,4,5{]} \newline random\_int = random.choice(intlist) \newline print (random\_int) \newline \newline fplist = {[}5.0,5.1,5.2,5.3,5.4,5.5{]} \newline random\_fp = random.choice(fplist) \newline print(random\_fp) \newline \newline strlist = {[}'dog','cat','bird','fish','fox'{]} \newline random\_str = random.choice(strlist) \newline print(random\_str) \newline \newline mylist = {[}'milly','earn','pim',1.1, 1.2{]} \newline random\_item = random.choice(mylist) \newline print(random\_item) \newline \newline myvar1 = 1 \newline myvar2 = 2 \newline myvar3 = 3 \newline varlist = myvar1, myvar2, myvar3 \newline random\_var = random.choice(varlist) \newline print (varlist, random\_var)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{\seqsplit{printFibonaccibetween0-50using} loop}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{0,1,1,2,3,5,8,13,...(เค้าให้เลขมา) \newline num1 = 0 \newline num2 = 1 \newline fibonacci = num1 + num2 \newline myoutput = "0,1" \newline while fibonacci: \textless{} 50: \newline myoutput = myoutput + "," + str(fibonacci) \newline num1 = num2 \newline num2 = fibonacci: \newline fibonacci: = num1 + num2 \newline print(myoutput)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{recieve number and know that number is -,+,0}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{num = int(input("Enter a number")) \newline if num \textgreater{} 0: \newline print(num, "is positive") \newline elif num \textless{} 0: \newline print(num, "is negative") \newline else: \newline print(num, "is zero")} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{recieve number that divide by 3}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{num = int(input("Enter your number:")) \newline remainder = num \% 3 \newline if remainder == 0: \newline print(num, "is divisible by 3") \newline else: \newline print(num, "is not divisible by 3")} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{convert number to integer and multiply product}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{num =int(input("Enter the number:")) \newline print(num * 5)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Countdown Code}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{user\_number = input("Please enter a number: ") \newline % Row Count 1 (+ 1) number = int(user\_number) \newline % Row Count 2 (+ 1) countdown\_string = " " \newline % Row Count 3 (+ 1) while number \textgreater{} 0; \newline % Row Count 4 (+ 1) countdown\_string = countdown\_string + " " + \newline % Row Count 5 (+ 1) str(number) \newline % Row Count 6 (+ 1) number = number -1 \newline % Row Count 7 (+ 1) print (countdown\_string)% Row Count 8 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Naming Conventions}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{Rules for naming variables:}} \newline % Row Count 1 (+ 1) -letters \newline % Row Count 2 (+ 1) -numbers \newline % Row Count 3 (+ 1) -underscores (\_) \newline % Row Count 4 (+ 1) -can start with letters or underscores ONLY \newline % Row Count 5 (+ 1) -NO SPACES \newline % Row Count 6 (+ 1) {\bf{Valid names:}} \newline % Row Count 7 (+ 1) - \_mystr \newline % Row Count 8 (+ 1) - my3 \newline % Row Count 9 (+ 1) Hello\_there \newline % Row Count 10 (+ 1) {\bf{Invalid names}} \newline % Row Count 11 (+ 1) - 3my= "hi" -{}- cannot start with number \newline % Row Count 12 (+ 1) - first name = "hi" -{}- dashes are not accepted% Row Count 13 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Vocabulary}} \tn % Row 0 \SetRowColor{LightBackground} variable & something that can change \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} string & a list of characters \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \seqsplit{integer/number} & pos/neg natural numbers and zero \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} floating point & decimal number \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} lenght & the lenght of the string \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} Modulo & Finds the remainder \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} Boolean & True/False \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} Syntax & Grammar/Structure of the language \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{This prints the true or false value using boolean}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{print(True) \newline % Row Count 1 (+ 1) print (2\textless{}3) \newline % Row Count 2 (+ 1) print (2 != 2)% Row Count 3 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{def area of circle}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{def areaOfCircle(r): \newline % Row Count 1 (+ 1) if r \textless{}= 0: \newline % Row Count 2 (+ 1) return "Error: invalid radius" \newline % Row Count 3 (+ 1) pi = 3.1415 \newline % Row Count 4 (+ 1) area = pi {\emph{ r }}*2 \newline % Row Count 5 (+ 1) return area \newline % Row Count 6 (+ 1) user\_radius = float(input("Enter the radius: ")) \newline % Row Count 7 (+ 1) print('The area of the circle is', \seqsplit{areaOfCircle(user\_radius))}% Row Count 9 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Spelling a string out in reverse ode}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{word = input("Type in an word; ") \newline % Row Count 1 (+ 1) reverse = " " \newline % Row Count 2 (+ 1) for letter in word: \newline % Row Count 3 (+ 1) reverse = letter + reverse \newline % Row Count 4 (+ 1) print ("Reverse: ", reverse)% Row Count 5 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{triangle and prism area}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{def areaOfTriangle(b, h): \newline area = 0.5 {\emph{ b }} h \newline return area \newline \newline user\_base = float =(input('Enter the base of the triangle: ')) \newline user\_height = float(input('Enter the height of the triangle: ')) \newline \newline print ('The area of the triangle is', \seqsplit{areaOfTrinagle(user\_base}, user\_height)) \newline \newline def volumeOfPrism(b, h, l): \newline volume = areaOfTriangle (b, h) * l \newline return volume \newline \newline \newline user\_lenght = float(input('Enter the length of the prism: ')) \newline print('The volume of the prism is', volumeOfPrism(user\_base, user\_height, user\_lengtth))} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.69678 cm} x{4.28022 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Functions}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{print0} & displays information on the screen \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{input0} & receives info from the user \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} int0 & converts the value into an integer \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} str0 & converts the value to a string \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \seqsplit{float0} & converts the value to a floating point \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} len0 & the lenght of the string \tn % Row Count 9 (+ 1) % Row 6 \SetRowColor{LightBackground} \# & One line comment not include in code \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} ''' & Multi-line comment \tn % Row Count 12 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{use a for loop to print....}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{0,01,012,0123,01234(เค้าจะให้เลขที่ต้องใส่มา) \newline mystring = "" \newline fpr num in range(5): \newline print (mystring)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Symbols}} \tn % Row 0 \SetRowColor{LightBackground} == & equal to \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} != & not equal to \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \textless{} & less than \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \textless{}= & less than or equal to \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \textgreater{} & greater than \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \textgreater{}= & greater than or equal \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} + & add \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} - & substract \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} * & multiply \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} / & divide and quotient is float \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} // & divide and quotient is integer \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} ** & exponent \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} \% & modulo: the remainder \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{about mystring fill in the blank}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{mystring = "" \newline count = 0 \newline while count \textless{} 5 \newline mystring = mystring + str(count) \newline print (mystring) \newline count = count+1} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{convert the integer and print product}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{user\_number = int(input("Enter a number")) \newline print(user\_number*5)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{print even number using loop}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{user\_number = -100 \newline while user\_number\textless{} -1: \newline print(user\_number) \newline user\_number = user\_number +2} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}