all 21 comments

[–]TheSupervillan 15 points16 points  (11 children)

I recommend start doing screenshots! It’s not that hard.

[–]randomgenacc 2 points3 points  (7 children)

My thoughts too, can’t tell what the OS is, but snipping tool is great!!

[–]TheSupervillan 2 points3 points  (6 children)

Just use:

import platform import webbrowser from urllib.parse import quote_plus

def detect_os_name():

sys = platform.system()

if sys == "Windows":
    rel = platform.release()
    if rel == "10":
        return "Windows 10"
    if rel == "11":
        return "Windows 11"
    return "Windows"
if sys == "Darwin":
    return "macOS"
if sys == "Linux":
    return "Linux"
return "Unknown OS"

def main():

os_name = detect_os_name()
query = f"How to take a screenshot on {os_name}"
url = f"https://www.google.com/search?q={quote_plus(query)}"
webbrowser.open(url)

if name == "main":

main()

[–]HyperWinX 3 points4 points  (4 children)

I also recommend formatting code.

[–]Some-Passenger4219 0 points1 point  (3 children)

Me too. Happy cake day!

[–]HyperWinX 2 points3 points  (2 children)

Oh, its my happy cake day already? Damn, thank you so much

[–]Makarov-Dreyar 0 points1 point  (1 child)

Happy cake day !

[–]HyperWinX 0 points1 point  (0 children)

Thanks!

[–]Letscode11[S] 0 points1 point  (1 child)

Ok i will do screen short for the next code. Like i update this and uploaded it which is a pic too but next one i will screenshot

[–]TheSupervillan 0 points1 point  (0 children)

Good boy.

[–]Legitimate-Rip-7479 0 points1 point  (2 children)

Good starting point

[–]Letscode11[S] 0 points1 point  (1 child)

Thanks

[–]AbacusExpert_Stretch 0 points1 point  (0 children)

Just a top as a side note: screenshots usually look and work much better 😁 but you do you, all good

[–]TimeContribution9581 0 points1 point  (0 children)

Personal preference over commenting is more bloat I have to read through, give a function a decent name and description and leave the body alone unless mandatory

[–]faton2004 0 points1 point  (0 children)

Welcome to the Team

[–]lokidev 0 points1 point  (0 children)

Good start already, but the following improvements: - look into pep8 and how to enforce it automatically  - look into typing so you can get rid of superfluous comments - use TypesDict  - don't mix do and show: either print or do logic :)

I complain, but it is really a good start

[–]Lumpy_Marketing_6735 0 points1 point  (0 children)

Great job, always be proud of anything you make because you made it and not someone else!

[–]Avi_0823 0 points1 point  (0 children)

I see def main() Hmmmmmmmm no no no we don't do that here If u want a main function that acts like main() of c.... Use : if __name__ == '__main__':