From dougal at dougalmatthews.com Tue May 6 09:51:11 2014 From: dougal at dougalmatthews.com (Dougal Matthews) Date: Tue, 6 May 2014 08:51:11 +0100 Subject: [Python Glasgow] Dojo Next Week Message-ID: Hi, Just a quick reminder, we are hosting another Dojo next week on the 13th at Twig. As a quick recap - a Dojo is a fun event that welcomes all level of ability. We spend the evening working in a small teams to come up with solutions to interesting (and often bizarre and amusing) problems. We still have some tickets available if you want to come along. Tickets: http://www.eventbrite.co.uk/e/may-dojo-tickets-11329090615 More info: https://mail.python.org/pipermail/glasgow/2014-April/000084.html Looking forward to seeing you there! Dougal -------------- next part -------------- An HTML attachment was scrubbed... URL: From hedieh.ebrahimi at amphos21.com Thu May 15 18:39:14 2014 From: hedieh.ebrahimi at amphos21.com (Hedieh Ebrahimi) Date: Thu, 15 May 2014 18:39:14 +0200 Subject: [Python Glasgow] converting string reperesenting a number in Scientific notation to int Message-ID: Hi all , I have a string that shows a number in scientific notation. like this: "2.000E-03" How can I comvert this to an integer so the result would be myIntValue=0.002 I need to convert my values and then use them later on in my code. Thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rossloganyoung at gmail.com Thu May 15 20:48:04 2014 From: rossloganyoung at gmail.com (Ross Young) Date: Thu, 15 May 2014 19:48:04 +0100 Subject: [Python Glasgow] converting string reperesenting a number in Scientific notation to int In-Reply-To: References: Message-ID: You want to convert it to a float rather than an int. strNum = "2.00E-03" float(strNum) -> 0.002 On 15 May 2014 17:39, Hedieh Ebrahimi wrote: > Hi all , > > I have a string that shows a number in scientific notation. > > like this: > "2.000E-03" > > How can I comvert this to an integer so the result would be > myIntValue=0.002 > > I need to convert my values and then use them later on in my code. > > Thanks for your help. > > _______________________________________________ > Glasgow mailing list > Glasgow at python.org > https://mail.python.org/mailman/listinfo/glasgow > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hedieh.ebrahimi at amphos21.com Fri May 16 09:21:45 2014 From: hedieh.ebrahimi at amphos21.com (Hedieh Ebrahimi) Date: Fri, 16 May 2014 09:21:45 +0200 Subject: [Python Glasgow] converting string reperesenting a number in Scientific notation to int In-Reply-To: References: Message-ID: Thanks a lot. That worked. On 15 May 2014 20:48, Ross Young wrote: > You want to convert it to a float rather than an int. > > strNum = "2.00E-03" > > float(strNum) > > -> 0.002 > > > On 15 May 2014 17:39, Hedieh Ebrahimi wrote: > >> Hi all , >> >> I have a string that shows a number in scientific notation. >> >> like this: >> "2.000E-03" >> >> How can I comvert this to an integer so the result would be >> myIntValue=0.002 >> >> I need to convert my values and then use them later on in my code. >> >> Thanks for your help. >> >> _______________________________________________ >> Glasgow mailing list >> Glasgow at python.org >> https://mail.python.org/mailman/listinfo/glasgow >> >> > > _______________________________________________ > Glasgow mailing list > Glasgow at python.org > https://mail.python.org/mailman/listinfo/glasgow > > -------------- next part -------------- An HTML attachment was scrubbed... URL: