Re: Having trouble getting Hello World to appear

2022-04-21 Thread MRAB
On 2022-04-22 02:57, Greg wrote: I downloaded and installed the auto version of the software. "auto version"? I go to the director C:\google-python-exercises> *python hello.py* I am running Windows. What am I doing incorrectly? I don't know, because you didn't say what did or didn't hap

Re: Enums and nested classes

2022-04-21 Thread Ethan Furman
On 4/21/22 15:00, Greg Ewing wrote: On 20/04/22 10:57 pm, Sam Ezeh wrote: Has anyone here used or attempted to use a nested class inside an enum? If so, how did you find it? (what did you expect to happen and did your expectations align with resulting behaviour etc.) That's a pretty open-ende

Re: Having trouble getting Hello World to appear

2022-04-21 Thread Greg
I downloaded and installed the auto version of the software. I go to the director C:\google-python-exercises> *python hello.py* I am running Windows. What am I doing incorrectly? I had the zip file installed under my One Drive and then moved it to my C drive Patiently waiting, Greg --

Re: Enums and nested classes

2022-04-21 Thread Greg Ewing
On 20/04/22 10:57 pm, Sam Ezeh wrote: Has anyone here used or attempted to use a nested class inside an enum? If so, how did you find it? (what did you expect to happen and did your expectations align with resulting behaviour etc.) That's a pretty open-ended question. Is there something about

Re: code issue

2022-04-21 Thread Greg Ewing
On 22/04/22 5:09 am, Chris Angelico wrote: This can't be your complete code, because it won't run like this. Also, the output you showed contains blank lines and lines with hyphens, and there is nothing in the code you posted which does that. If I had to guess, I'd say you have a loop which is

Re: code issue

2022-04-21 Thread Chris Angelico
On Fri, 22 Apr 2022 at 04:19, Jack Dangler wrote: > > > On 4/21/22 13:09, Chris Angelico wrote: > > On Fri, 22 Apr 2022 at 03:02, Tola Oj wrote: > >> for i in range(1, n+1): > >> if i % 3 == 0 and i % 5 == 0: > >> print("Fizzbuzz") > >> elif i % 3 == 0: > >>

Re: code issue

2022-04-21 Thread Jack Dangler
On 4/21/22 13:09, Chris Angelico wrote: On Fri, 22 Apr 2022 at 03:02, Tola Oj wrote: for i in range(1, n+1): if i % 3 == 0 and i % 5 == 0: print("Fizzbuzz") elif i % 3 == 0: print("Fizz") elif i % 5 == 0: print("Buzz")

Re: code issue

2022-04-21 Thread Chris Angelico
On Fri, 22 Apr 2022 at 03:02, Tola Oj wrote: > > for i in range(1, n+1): > if i % 3 == 0 and i % 5 == 0: > print("Fizzbuzz") > elif i % 3 == 0: > print("Fizz") > elif i % 5 == 0: > print("Buzz") > else: > print(i) >

code issue

2022-04-21 Thread Tola Oj
given a number n, for each integer i in the range from 1 to n inclusive, print one value per line as follows: . if i is a multiple of both 3 but not 5, print fizz. .if i is a multiple of 5 but not 3, print buzz .if i is not a multiple of 3 or 5, print the value of i. the above is the question. the

Re: Tuple unpacking inside lambda expressions

2022-04-21 Thread Peter Otten
On 20/04/2022 13:01, Sam Ezeh wrote: I went back to the code recently and I remembered what the problem was. I was using multiprocessing.Pool.pmap which takes a callable (the lambda here) so I wasn't able to use comprehensions or starmap Is there anything for situations like these? Hm, I don'