<div dir="ltr"><div>I have reviewed my earlier program and made some edits.  It includes edits to the data (adding a nonsensical inequality sign preceded by a space), and using the find statement in the revised program.  </div><div><br></div><div>The program reads two decimal numerals, decides whether the number read is less than or equal to a certain amount, prints the number and a letter grade.  I made the number print two digits after the decimal.  </div><div><br></div><div>By including a  couple of tricks, the situation which requires reading a decimal numeral, even if Python requires X-Professional computer and XP system, you can still make it do what you want.  See attached.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 10:39 AM, Angela Grima <span dir="ltr"><<a href="mailto:amgrima58@gmail.com" target="_blank">amgrima58@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have not received a response from you.  However, I think I know what the problem is.  My laptop is XP (important in terms of programming in mathematics and science for obvious reasons).  However, my operating system is Professional only - no XP.  It doesn't seem to make a difference in most situations, but it is unable to read the decimal point in as a string variable in Python.  It reads it as a literal and therefore it is unable to change to a floating number.  In other words, Python does not have the ability to change the "." into an equivalent decimal point in the system that I have.  But please note, that the underlying assumption here is that Python is able to do so in an XP system.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Angela Grima</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 4:24 PM, Angela Grima <span dir="ltr"><<a href="mailto:amgrima58@gmail.com" target="_blank">amgrima58@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Hello,</div><div>\</div><div>I am a beginner at Python and I am trying to write a program that allows me to read in a list of decimal numerals, assign a grade to each one, and write each one with the corresponding grade. Unfortunately, it Python thinks that each score is a string but does not allow me to convert it to a floating point.  I have tried different statements using Python but I am still stuck.  Attached are a copy of the program, data being used.  Below is the printed output.</div><div><br></div><div><br></div><div><font style="background-color:rgb(255,255,0)">Microsoft Windows [Version 6.1.7601]<br>Copyright (c) 2009 Microsoft Corporation.  All rights reserved.</font></div><div><font style="background-color:rgb(255,255,0)">C:\Users\Ange\Documents\Computer Science\Python Class>docbright.py<br>Score Grade<br>Traceback (most recent call last):<br>  File "C:\Users\Ange\Documents\Computer Science\Python Class\docbright.py", lin<br>e 18, in <module><br>    x = float(x) + .005<br>ValueError: could not convert string to float:</font><font style="background-color:rgb(255,255,0)">ss></font></div><div><strong></strong><br></div><div>Your help is appreciated.</div><span><font color="#888888"><div><br></div><div>Angela Grima</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>