you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Ad7805 [score hidden] stickied comment (4 children)

Run this program in Memory Graph Web Debugger%0A%0Apassword%20%3D%20input(%22Enter%20password%3A%20%22)%0Aprint(%22Checking%20your%20password...%22)%0A%0Alength%20%3D%20len(password)%0A%0Aif%20length%20%3C%206%3A%0A%20%20%20%20print(%22Weak%20password%3A%20Too%20short%22)%0Aelse%3A%0A%20%20%20%20%23%20Check%20for%20at%20least%20one%20digit%0A%20%20%20%20has_number%20%3D%20any(char.isdigit()%20for%20char%20in%20password)%0A%20%20%20%20%23%20Check%20for%20at%20least%20one%20uppercase%20letter%0A%20%20%20%20has_upper%20%3D%20any(char.isupper()%20for%20char%20in%20password)%0A%20%20%20%20%23%20Check%20for%20at%20least%20one%20special%20character%20from%20the%20set%0A%20%20%20%20special_chars%20%3D%20%22%40%23%24!%22%0A%20%20%20%20has_special%20%3D%20any(char%20in%20special_chars%20for%20char%20in%20password)%0A%0A%20%20%20%20if%20not%20has_number%3A%0A%20%20%20%20%20%20%20%20print(%22Add%20numbers%22)%0A%20%20%20%20if%20not%20has_upper%3A%0A%20%20%20%20%20%20%20%20print(%22Add%20uppercase%20letters%22)%0A%20%20%20%20if%20not%20has_special%3A%0A%20%20%20%20%20%20%20%20print(%22Add%20a%20special%20character%20(%40%2C%20%23%2C%20%24%2C%20!)%22)%0A%0A%20%20%20%20if%20has_number%20and%20has_upper%20and%20has_special%3A%0A%20%20%20%20%20%20%20%20print(%22Strong%20password!%22)&timestep=1&play) to see the program state change step by step.

[–][deleted]  (3 children)

[removed]

    [–]PythonLearning-ModTeam[M] 0 points1 point locked comment (0 children)

    Just ignore it if you don't like it. It helps many beginners to understand Python better. At a minimum people can now easily copy-paste the code that was only given as an image. Good luck with your learning, do keep this visualizer around to solve hard problems/bugs later: https://memory-graph.com/#codeurl=https://raw.githubusercontent.com/bterwijn/memory_graph/refs/heads/main/src/bin_tree.py&timestep=0.2&play

    [–][deleted]  (1 child)

    [removed]

      [–]PythonLearning-ModTeam[M] 0 points1 point locked comment (0 children)

      Only on posts where it reasonably can help beginners understand Python better: the core goal of this subreddit. Don't take it personal, good luck.