<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/document_iterator.js"></script>
<meta name="document_iterator.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/find_proxy.js"></script>
<meta name="find_proxy.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/get_html_text.js"></script>
<meta name="get_html_text.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/global_constants.js"></script>
<meta name="global_constants.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/name_injection_builder.js"></script>
<meta name="name_injection_builder.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/number_injection_builder.js"></script>
<meta name="number_injection_builder.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/string_finder.js"></script>
<meta name="string_finder.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/change_sink.js"></script>
<meta name="change_sink.js">
<meta name="document_iterator.js">
<meta name="find_proxy.js">
<meta name="get_html_text.js">
<meta name="global_constants.js">
<meta name="name_injection_builder.js">
<meta name="number_injection_builder.js">
<meta name="string_finder.js">
<meta name="change_sink.js">
<script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/document_iterator.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/find_proxy.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/get_html_text.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/global_constants.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/name_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/number_injection_builder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/string_finder.js"></script><script src="chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/change_sink.js"></script><style type="text/css" id="owaParaStyle"></style>
<meta name="document_iterator.js">
<meta name="find_proxy.js">
<meta name="get_html_text.js">
<meta name="global_constants.js">
<meta name="name_injection_builder.js">
<meta name="number_injection_builder.js">
<meta name="string_finder.js">
<meta name="change_sink.js">
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div><br class="Apple-interchange-newline">
I have a question. In a assignment it asks for me to do the following below...</div>
<div><br>
</div>
<div>
<pre style="word-wrap: break-word; white-space: pre-wrap; "><b>if "peek" then print the Student object at the beginning 
                of the list (using __str__) but don't remove it from 
                the list;</b></pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; "><br></pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; ">Could you explain what it means?</pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; "><br></pre>
<pre style="word-wrap: break-word; white-space: pre-wrap; "><b>This is what I have so far,</b></pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; "><b>elif ask == "peek":
                print("First Name In List =", names[0])</b></span></pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; ">How would you make it a string?</span></pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; "><br></span></pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; ">I know have a example of it but I'm not sure how to apply it to my code...The example is below.</span></pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; "><br></span></pre>
<pre style="word-wrap: break-word; "><p style="margin-top: 7.68pt; margin-bottom: 0pt; margin-left: 0.38in; text-indent: -0.38in; direction: ltr; unicode-bidi: embed; word-break: normal; "><font size="3"><span style="font-family: Calibri; ">def __</span><span style="font-family: Calibri; ">str</span><span style="font-family: Calibri; ">__(self):</span></font></p><p style="text-indent: -36.480003356933594px;margin-top: 7.68pt; margin-bottom: 0pt; margin-left: 0.38in; direction: ltr; unicode-bidi: embed; word-break: normal; "><span style="font-size: medium; text-indent: 0px; "><span class="Apple-tab-span" style="white-space:pre">     </span>return </span><span style="text-indent: 0px; font-family: Calibri; ">self.sides</span><span style="text-indent: 0px; font-family: Calibri; "> + "\t" + </span><span style="text-indent: 0px; font-family: Calibri; ">self.value</span><span style="text-indent: 0px; font-family: Calibri; ">
</span></p><p style="text-indent: -36.480003356933594px;margin-top: 7.68pt; margin-bottom: 0pt; margin-left: 0.38in; direction: ltr; unicode-bidi: embed; word-break: normal; "><span style="text-indent: 0px; font-family: Calibri; "><br></span></p><p style="text-indent: -36.480003356933594px;margin-top: 7.68pt; margin-bottom: 0pt; margin-left: 0.38in; direction: ltr; unicode-bidi: embed; word-break: normal; "><span style="text-indent: 0px; font-family: Calibri; "><b>Also below is part of the assignment and my whole code is in the attachment.</b></span></p>
<pre style="word-wrap: break-word; ">A <span style="white-space: pre-wrap; ">"main" function which does the following:
(1) create an empty list;
(2) ask the user if he/she wants to perform a list operation.
     if "yes": 
         (a) prompt the user for the operation: 
                "test", "peek", "add", or "remove";             
         (b) perform the operation: 
           (i) if "test" then print whether the list is empty or not;
           (ii) if "peek" then print the Student object at the beginning 
                of the list (using __str__) but don't remove it from 
                the list;
           (iii) if "add", then prompt the user for student info, make
                 a Student object containing that info, and 
                 add that Student object to the end of the list;  
           (iv) if "remove", then delete the Student object at the  
                beginning of the list and print it using __str__; 
     repeat step (2) until the user enters "no";
(3) neatly print the entire list from beginning to end.</span></pre>
</pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; "><br></span></pre>
<pre style="word-wrap: break-word; "><span style="white-space: pre-wrap; "><br></span></pre>
<br class="Apple-interchange-newline">
</div>
</div>
<span id="skype_highlighting_settings" display="none" autoextractnumbers="1"></span>
<object id="skype_plugin_object" location.href="https://bl2prd0710.outlook.com/owa/?ae=Item&a=New&t=IPM.Note&cc=MTQuMTYuMTQzLjEsZW4tVVMsMTAsSFRNTCwwLDA=&pspid=_1347376654758_760748763" location.hostname="bl2prd0710.outlook.com" style="position: absolute; visibility: hidden; left: -100px; top: -100px; " width="0" height="0" type="application/x-vnd.skype.click2call.chrome.5.7.0">
</object>
</body>
</html>