Re: Having trouble getting Hello World to appear
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 happen. Did it say it couldn't find Python? If yes, try the Python Launcher instead: py hello.py I had the zip file installed under my One Drive and then moved it to my C drive -- https://mail.python.org/mailman/listinfo/python-list
Re: Enums and nested classes
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-ended question. Is there something about its current behaviour that you think should be different? Indeed -- the point of the question is to (hopefully) find out what folks have already tried, and whether they found the current behavior surprising. We're looking for what happened in practice, not for what should happen in theory. ;-) And of course, no one using enums that way means we can change how that bit works fairly easily. -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list
Re: Having trouble getting Hello World to appear
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 -- https://mail.python.org/mailman/listinfo/python-list
Re: Enums and nested classes
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 its current behaviour that you think should be different? -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: code issue
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 supposed to repeatedly read a value for n and then compute fizzbuzz, and you have the input statement in the wrong place. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: code issue
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: > >> print("Fizz") > >> elif i % 5 == 0: > >> print("Buzz") > >> else: > >> print(i) > >> print(i, sep='\n') > >> > >> fizzbuzz(13) > > This can't be your complete code, because it won't run like this. Have > > a very careful read through of your code, and consider adding some > > extra print statements to see what's happening; but if you're asking > > for help, you'll definitely need to post the entire program. > > > > ChrisA > fizzbuzz is one of Angela Yu's lab assignments in her py course.If you > ask her, she'll gladly tell you where you are going wrong and even > supply an entirely correct version, if you want it... Fizz Buzz is a very common assignment. The point isn't to get a correct version, the point is to understand what it's doing :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: code issue
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") else: print(i) print(i, sep='\n') fizzbuzz(13) This can't be your complete code, because it won't run like this. Have a very careful read through of your code, and consider adding some extra print statements to see what's happening; but if you're asking for help, you'll definitely need to post the entire program. ChrisA fizzbuzz is one of Angela Yu's lab assignments in her py course.If you ask her, she'll gladly tell you where you are going wrong and even supply an entirely correct version, if you want it... -- https://mail.python.org/mailman/listinfo/python-list
Re: code issue
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) > print(i, sep='\n') > > fizzbuzz(13) This can't be your complete code, because it won't run like this. Have a very careful read through of your code, and consider adding some extra print statements to see what's happening; but if you're asking for help, you'll definitely need to post the entire program. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
code issue
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 below is my answer, but it keeps saying I'm failing it and this is the output my code keeps giving me: it passes my input n (Which was 13) and starts to print from 1 again. please help - 1 - 2 - Fizz - 4 - Buzz - Fizz - 7 - 8 - Fizz - Buzz - 11 - Fizz - 13 - 1 - 2 - Fizz - 4 - Buzz - Fizz - 7 - 8 - Fizz - Buzz - 11 - Fizz - 13 - 14 - Fizzbuzz 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) print(i, sep='\n') fizzbuzz(13) -- https://mail.python.org/mailman/listinfo/python-list
[Python-announce] CrossCompute Analytics Automation Framework 0.9.2.3
Turn your Jupyter notebook, Python script, Julia script, R script or Bash script into a web-based tool or runnable report by writing a configuration file. We are happy to announce the latest release of our CrossCompute Analytics Automation Framework. - crosscompute 0.9.2.3 is our development server that turns notebooks and scripts into web-based tools and runnable reports. - crosscompute-views-map 0.1.2.1 adds interactive maps to your reports. - crosscompute-printers-pdf 0.3.2 adds batch PDF print functionality. - jupyterlab-crosscompute 0.2.2 lets you prototype automated reports without leaving the JupyterLab environment. Please see https://github.com/crosscompute/crosscompute/blob/develop/crosscompute/templates/configuration.yml for available configuration options. pip install crosscompute crosscompute-views-map git clone https://github.com/crosscompute/crosscompute-examples cd crosscompute-examples/widgets/paint-letters bash setup.sh crosscompute pip install jupyterlab jupyterlab-crosscompute git clone https://github.com/crosscompute/crosscompute-examples cd crosscompute-examples/widgets/paint-letters jupyter lab - https://forum.crosscompute.com/t/crosscompute-framework-0-9-2-3-release-notes/175 - https://forum.crosscompute.com/t/crosscompute-framework-0-9-1-4-release-notes/173 Version 0.9.2.3 adds variable labels and basic styling. In the coming weeks, we will add more variable views for more data types. Request a feature by emailing supp...@crosscompute.com, document an issue at https://github.com/crosscompute/crosscompute/issues or ask a question on https://forum.crosscompute.com. - Reference: https://github.com/crosscompute/crosscompute-examples - Gallery: https://crosscompute.net - Documentation: https://docs.crosscompute.com - Forum: https://forum.crosscompute.com Thank you to those who have made this work possible: Kashfi Fahim, Olga Ryabtseva, Miguel Ángel Gordián, Marta Moreno, Salah Ahmed, Rodrigo Guarachi, Polina Chernomaz, Samuel Edandison, Ning Wei, Noé Domínguez Porras, Alex Hofmann, Ji Yoon Lee, Tyler Doyle, Ethan Epstein, Shaky Sherpa, Eugen Fomenko, Trevor David Rhone, Cathaleen Kaiyoorawongs, Jennifer Ruda, Matt Henning, Elizabeth Ritter, Chenxin Han, Soo Ji Choi, Yao Kou, Ying Zhou, Margarita Zias, Elaine Chan, Aida Shoydokova, Lauren Talbot, Benjamin Dean, Catherine Kwan, Nicholas O'Brien, Michael Flowers, Matt Basinger, Dorcas Murai, Christopher Horner, Liliana Durán, Ariana Gradow, Selin Kocaman, Rajesh Menon, Jessica Leon, Diego Saenz, Paul Everitt, Edwin Adkins, Chris Natali, Susan Kum, Aly Sanoh, Vijay Modi, Jake Maslow. ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announce-list-le...@python.org https://mail.python.org/mailman3/lists/python-announce-list.python.org/ Member address: arch...@mail-archive.com
Re: Tuple unpacking inside lambda expressions
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't see pmap, but there is a starmap(): https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.starmap -- https://mail.python.org/mailman/listinfo/python-list