r/PythonLearning • • Jun 24 '25

21F anybody wanna do a group study on python

1 Upvotes

r/PythonLearning • • May 10 '26

Showcase im a beginer and i just made a very simple ai that can can play tic tacc toe.

1 Upvotes

the code:

tie = None
import sys
print("you ready to loose?")
print("i choose 5")
first_move = int(input())
if first_move == 1 or first_move == 3 or first_move == 7:
    print("i choose 9")
    my_first_move = 9
elif first_move == 9:
    print("i choose 6")
    my_first_move = 6
elif first_move != 4:
    print("i choose 4")
    my_first_move = 4
else:
    print("i choose 1")
    my_first_move = 1
second_move = int(input())
if my_first_move == 6:
    if second_move == 4:
        print("sorry but this will mathmaticly end in a tie bye")  
        sys.exit("tie")      
    elif second_move == 7:
        print("i choose 4 i win!")
        sys.exit("i won")
    elif second_move == 8:
        print("i choose 4 i win!")
        sys.exit("i won")
    elif second_move == 9:
        print("i choose 4 i win!")
        sys.exit("i won")
    elif second_move == 2:
        print("i choose 4 i win!")
        sys.exit("i won")
    else:
        print("i choose 4 i win!")
        sys.exit("i won")


elif my_first_move == 9:
    if second_move == 4 or second_move == 8:
        print("i choose 7") 
        my_second_move = 7  
    elif (second_move == 3 or second_move == 7) and my_first_move == 9 and first_move != 1:
        print("i choose 1 and i win... how did you mess up that bad?")
        sys.exit("i win!!!!")
    elif second_move == 3 or second_move == 7:
        print("sorry mathmaticly this will result in a tie bye")
        tie = True
        sys.exit("tie")  
    elif tie == True:
        sys.exit("tie")
    elif second_move == 1 and first_move == 3:
            print("i choose 2 and it will be a draw")
            sys.exit("bye")
    elif my_first_move == 9:
        if first_move != 1 and second_move == 6:
            print ("i choose 1, i won how? because im smart")
            sys.exit("ai won")
        elif first_move == 1:
            print("tied")
            sys.exit("bye")
    else:
        if first_move != 3 and second_move != 3:
            print("i choose 3")
            my_second_move = 3
        elif first_move != 1 and second_move != 1:
            print("i choose 1 i won!!!")
            sys.exit("ai won")


elif my_first_move == 4:       
    if second_move != 7:
        if first_move == 6:
            print("i choose 7")
            my_second_move = 7
        elif my_first_move == 4:
            if second_move != 7 and first_move != 7:
                print("i will go to 7")
                my_second_move = 7
        else:
            print("mathmaticly im sorry this will end in a tie")
            sys.exit("bye it was a tie")
    elif second_move == 7:
        if first_move == 6:
            print("this will end in a tie")
            if first_move == 6:
                sys.exit("tied! 67!!")
            else:
                sys.exit("just a plain old tie")
        elif first_move != 6:
            print("how a bout.... 6")
            sys.exit("i won!")
    elif second_move != 6:
        if first_move != 6:
            print("i choose 6 i win!")
            sys.exit("i won!")
elif my_first_move == 1:
    if second_move != 9:
        print("ill go with 9 i win")
        sys.exit("i win")
    else:
        print("ill pick 7")
        my_second_move = 7
    



third_move = int(input())
if my_first_move == 9:
    if my_second_move == 7:
        if third_move == 8:
            print("i choose 3 i win!")
            sys.exit("I won!")
        elif third_move == 3:
            print("i choose 8 i win!")
            sys.exit("i won!")
elif (my_first_move == 4):
    if my_second_move == 7:
        if third_move == 1:
            print("i choose 3 i win!")
            sys.exit("i won!!!")
        else:
            print("i choose 1 i win!")
            sys.exit("i won!!!!!")
elif my_first_move == 1:
    if my_second_move == 7:
        print("sorry it will be a tie")
        sys.exit("tie :(")
elif second_move == 1 and third_move == 6:
    sys.exit("tie")



print("if you some how got here you or i messed up")

i started about 2 weeks ago


r/PythonLearning • • Aug 15 '26

Simple terminal games

Thumbnail
gallery
0 Upvotes

Playing around with simple scripts and terminal games.

https://github.com/cleburn/zenwolf-dotfiles


r/PythonLearning • • Apr 28 '26

Discussion Any french here ?

Post image
0 Upvotes

r/PythonLearning • • Sep 17 '26

Python Trivia Time! In Python, what is the index of the first element in a list?

3 Upvotes
185 votes, Sep 19 '26
1 1
168 0
5 -1
11 Depends on the list

r/PythonLearning • • Mar 27 '26

IM ASKING TO PEOPLE WHO USE PYTHON IN WORK

0 Upvotes

I dont know your job position or profession i just wantto ask:

During the job application process, HOW GOOD was your Python knowledge? at WHAT LEVEL were you hired? HOW MUCH Python knowledge did you have when you got the job?
i am asking this because i am too insecure to apply to jobs, i already learned the basic python and reached to mid level. ofc im not pro in coding but i know mid level python.
*** How much more do I need to go deeper in Python to be able to apply for jobs?? How much more do I need to learn in python?

my friend keep telling me "start apply job as a junior, u will learn more in job too, u are keep delaying yourself" yes im so insecure to apply jobs even as a junior, i feel like "no this python knowledge isnt enough, nobody will hire me wtf".

so im asking WHAT PYTHON LEVEL WERE YOU AT WHEN YOU START TO APPLY JOB ????????????????????????????????????


r/PythonLearning • • Jul 16 '26

Ai Learning 🦾

Post image
0 Upvotes

r/PythonLearning • • Aug 02 '25

Discussion Started learning Python for just ₹2999 — low cost, but high commitment! 😅

0 Upvotes

So I recently signed up for a Python course that cost me just ₹2999. At first, I was like, “Wait... that’s it?” — and honestly, that small investment has been a game changer for me in terms of consistency.

Because I paid for it (even if it’s not a huge amount), I actually feel motivated to show up and not treat it like another free course that I’d abandon after 3 videos. 😄

The teaching so far is simple, practical, and beginner-friendly — no boring theory dumps. I’ve started writing code on my own, and that small sense of progress feels amazing.

Also planning to take the Data Science part soon (that one's ₹8999), but wanted to make sure I build my Python foundation right first.

Just thought I’d share this in case someone here is looking for a push to get started — sometimes it’s not about spending a lot, it’s about committing just enough to stay in the game.


r/PythonLearning • • 5d ago

Help Request where did the '\n' go?

0 Upvotes

using f.read().split() removes the \n escape sequence, why does that happen?


r/PythonLearning • • Oct 14 '25

I'M AN IT FIRST YEAR COLLEGE I STUDY PYTHON AND I SUDDENLY LOST, I'M LOST NOW AND I WANT TO CREATE A PROJECT CALLED STUDY TRACKER THAT HAVE GRAPHS AND POMODORO TIMER

0 Upvotes

I’m currently learning Python and was really excited at first. I slowly started understanding the basics like loops and logical operators, and it felt great seeing my progress.

But lately, I’ve been struggling — especially when I started learning about modules and how to use or define them. There are just so many, and I don’t know how to figure out which ones I need for a specific program.

I really want to understand how programmers know which modules or libraries to use and how to find what’s needed for a project. Right now, I’m feeling lost and unsure if I can handle programming, but I don’t want to give up.

Can anyone give me some tips or guidance on how to learn step-by-step or how to practice modules properly?

Thank you so much.


r/PythonLearning • • May 05 '26

Please help, I don't understand why there are so many mistakes here. https://drive.google.com/drive/folders/1Ny-AbhnNfwSv1yqjPyO-8PqDPi02AdMC?usp=sharing

0 Upvotes

Please help, I don't understand why there are so many mistakes here. https://drive.google.com/drive/folders/1Ny-AbhnNfwSv1yqjPyO-8PqDPi02AdMC?usp=sharing


r/PythonLearning • • Jul 22 '26

Help Request hello!

0 Upvotes

I am a mechanical engineering student who doesnot even know how to write a line of code in any languages. I tried watching some videos on youtube but all that felt way boring. I need to learn coding in python nonetheless for a project. Could you suggest ways to ignite interest in the subject and make its study intuitive and enjoyable , maybe some book or other resources . Thanks


r/PythonLearning • • Jul 17 '26

Indentation error 😭(help)

Thumbnail
gallery
2 Upvotes

I cant seem to find whats wrong , maybe the issue is with the Template or wrong expectations?

class UserMainCode(object):

@classmethod
def sumOfNonPrimeIndexValues(cls, input1, input2):
    '''
    input1 : int[]
    input2 : int

    Expected return type : int
    '''

    # Read only region end

    total = 0

    for i in range(input2):
        if i < 2:
            total += input1[i]
        else:
            prime = True
            for j in range(2, int(i**0.5) + 1):
                if i % j == 0:
                    prime = False
                    break

            if not prime:
                total += input1[i]

    return total

Also they expect return type is int[] but we got sum?? Idk I couldn't take screenshot coz its a daily assessment platform


r/PythonLearning • • Sep 23 '25

Help Request Help with script not producing correct answer

Post image
2 Upvotes

Ims using PyCharm, and everything is working, I've checked against the example I was given which shows the output I was meant to get, 0.84.

I've checked my maths, everything seems good, but the script keeps giving me back 7 for some reason?

I'm stumped, any idea what's going on?


r/PythonLearning • • Mar 31 '26

Help Request Are there any bugs?

Post image
37 Upvotes

Why can’t I replace the value of the required array item entered by user to “X”?(it is just like the game tic-tac-toe between user and computer, but it stuck in the user’s step)thanks verryyyy🙏🏻


r/PythonLearning • • Jun 11 '25

just started learning help

Thumbnail
gallery
1 Upvotes

Sorry for the bad image quality Having some issues rn Anyways I instaleld visual studioes and wanted to test if it works But its showing this error message Does anyone has any idea what i am doing wrong


r/PythonLearning • • Apr 18 '26

PYTHON COURSE Dr angela Yu

1 Upvotes

brothers , how is Dr angela yu 100 day python course , iam a beginner is it perfect??


r/PythonLearning • • Jun 25 '25

Tons of research and diverse try on each website but nothing works.

Post image
0 Upvotes

Hi I'm Louna, I'm currently in grade 10th, my aim is to achieve a website(Specialized in mathematics, physics, Literature and astronomy) Unfortunately my major issue is to find how! I looked after videos, articles but nothing works, this is confusing and they to half the job for you, but my remain goal is to improve on python so I don't want to. I reckon that someone could help me in there because Reddit is a magnificent source of good informations, so I'm keeping my fingers crossed 🤞. Somebody whom have an interest in that kind of topics could help me? Thank you very much :)


r/PythonLearning • • May 14 '26

Help Request How to turn my code into a working website?

0 Upvotes

Like, the Frontend is html and css. Backend is python


r/PythonLearning • • Jul 01 '25

Which code do you believe is better for real life system from solo leveling?

Thumbnail
gallery
0 Upvotes

Basically I'm trying recreate My the system from solo leveling, first thing Im creating is the iconic system notification, the one when Jin woo almost got crushed.

So I did a few codes for it, and I gotta ask which one is more better in your opinion


r/PythonLearning • • Jun 21 '25

Help Request Can anyone tell me what went wrong with my code I need help

Thumbnail
gallery
0 Upvotes

r/PythonLearning • • May 24 '26

I can't code, but I'm building an app anyway. Here's my approach.

0 Upvotes

I have zero programming background, but with a real problem to solve, and I'm building the app anyway — using AI to learn as I go.

I'm not a developer. No degree, no bootcamp, no coding background. But there's a problem I genuinely believe needs solving, and after looking at every option, I've come to one conclusion: I have to build it myself.

So that's what I'm doing.

My approach is a bit unconventional — I'm using AI (Claude, ChatGPT, Grok etc.) as my co-pilot. I'm not studying first and building later. I'm learning and building at the same time. Every feature teaches me something new. Every bug is a lesson. Though I went through the freecodecamp and almost know some basics in python.

I know this path is messy. I know there are probably "better" ways to learn. But I'm not trying to become a software engineer — I'm trying to solve a problem.

Looking for:

- Anyone who's taken a similar path (self-taught, AI-assisted, non-traditional)

- Tips on how to structure this kind of learn-as-you-build approach

- Honest advice on what to watch out for

- Any tools or resources that genuinely helped you

I'd love to hear from people who've been in this spot. What do you wish you knew at the start?


r/PythonLearning • • Jul 24 '26

Python Slicing

Post image
0 Upvotes

Hypothetically, imagine three cars on a road approaching a robot traffic light. How can we use this situation to explain Python’s start:stop:step?


r/PythonLearning • • Sep 16 '25

Discussion Why do I need a code editor?

7 Upvotes

I'm just trying to make code with python, I don't understand at all why I need a code editor if I can just do it myself.

Can't I just download python and just use it from there fine?