Why does it have red squiggly lines under it if it works perfectly fine and no errors happen when I run it?
William Bryant
gogobebe2 at gmail.com
Sat Sep 21 01:59:57 EDT 2013
On Saturday, September 21, 2013 1:39:41 AM UTC+12, Duncan Booth wrote:
> William Bryant <gogobebe2 at gmail.com> wrote:
>
>
>
> > Thanks a lot! I have one more question, is there any way I can make my
>
> > program work on android tablets and ipads? Because I'd like to use it
>
> > in school because we are learning statistics and we are allowed our
>
> > devices in school.
>
> >
>
>
>
> You can install SL4A on Android and that should let you run your script on
>
> an Android tablet. You may want to modify the script to work with the
>
> android UI, or it might be enough just to run it in a terminal window.
>
>
>
> I don't believe there is an ipad equivalent, but so long as you have a
>
> network connection, another option to consider (that would work on both
>
> android and ipad) would be to run the script on a server somewhere and
>
> connect to it through a web browser. Have a look at https://c9.io as that
>
> gives you a full development environment that can be accessed through a web
>
> browser: I don't know how well it works on a tablet but it would be worth
>
> trying.
>
>
>
>
>
> --
>
> Duncan Booth http://kupuguy.blogspot.com
Ok thanks for that, I know I said 1 more question but I just made the median function, could u tell me how I could finish it? I can't think of a way:
def median():
medlist = List
medlist.sort()
if len(List) % 2:
while len(list) > 2:
medlist.popleft()
medlist.popright()
if medlist[0] == medlist[1]:
themedian = medlist
elif medlist[0] != medlist[1]:
#make an if statment to figure out the median if the last 2 left are not the same. Eg [1, 2] the middle value is 1.5
pass
else:
while len(medlist) > 1:
medlist.popleft()
medlist.popright()
themedian = medlist
return themedian
More information about the Python-list
mailing list