On Thu, Nov 21, 2013 at 3:04 PM, Albert-Jan Roskam wrote:
>
> Today I had a csv file in utf-8 encoding, but part of the accented
> characters were mangled. The data were scraped from a website and it
> turned out that at least some of the data were mangled on the website
> already. Bits of the tex
Hej there,
@David @Peter @Amit:
Thank you so much - you guys helped me understand my misconceptions
and I learned a couple new things.
On Thu, Nov 21, 2013 at 12:44 PM, Amit Saha wrote:
> On Thu, Nov 21, 2013 at 9:00 PM, Rafael Knuth wrote:
>> Hej there,
>>
>> I want to use a while loop in a pr
On 21/11/2013 20:04, Albert-Jan Roskam wrote:
Hi,
Today I had a csv file in utf-8 encoding, but part of the accented characters
were mangled. The data were scraped from a website and it turned out that at
least some of the data were mangled on the website already. Bits of the text
were actual
Hi,
Today I had a csv file in utf-8 encoding, but part of the accented characters
were mangled. The data were scraped from a website and it turned out that at
least some of the data were mangled on the website already. Bits of the text
were actually cp1252 (or cp850), I think, even though the w
On 21/11/13 13:17, Rafael Knuth wrote:
I'm only stuck at one point: How do I loop back to the beginning in
case the user input is invalid?
Look at Peter's example. He set a variable to false when the input was
wrong. You can check that value in your while loop.
HTH
--
Alan G
Author of the L
On Thu, Nov 21, 2013 at 9:00 PM, Rafael Knuth wrote:
> Hej there,
>
> I want to use a while loop in a program (version used: Python 3.3.0),
> and I expect it to loop unless the user enters an integer or a
> floating-point number instead of a string.
>
> print("TIME TRACKING")
> hours_worked = inpu
On Thu, 21 Nov 2013 12:00:31 +0100, Rafael Knuth
wrote:
hours_worked = input("How many hours did you work today? ")
while hours_worked != str() or int():
hours_worked = input("Can't understand you. Please enter a
number! ")
There are two problems with your conditional expression. First
Rafael Knuth wrote:
> Hej there,
>
> I want to use a while loop in a program (version used: Python 3.3.0),
> and I expect it to loop unless the user enters an integer or a
> floating-point number instead of a string.
>
> print("TIME TRACKING")
> hours_worked = input("How many hours did you work
Hej there,
I want to use a while loop in a program (version used: Python 3.3.0),
and I expect it to loop unless the user enters an integer or a
floating-point number instead of a string.
print("TIME TRACKING")
hours_worked = input("How many hours did you work today? ")
while hours_worked != str()