python primer code example

Example 1: how to get started with python

#the best way to start with anything is not to rush and start with the basics
#python however is really good for begginers as it is easy to read and understaned
#and has relatively easy syntax so dont spend a lot of time on the basics like
#print() and if  rather learn the basics and learn about the libraries 
#and a good way to learn about the libraries is https://pypi.org/ if you are also
#struggling to find motivation for programming the best way to work around it is
#to learn how dopamine works in your brain and how to use it in progoramming
#for that use the video https://www.youtube.com/watch?v=9QiE-M1LrZk
#for a good IDE i reccomend pycharm
#and remember programming is not something you should remember to be good 
#programming is something you need to understand and to be a good programmer you 
# need to know how to put the internet to a good use and to know where to search

#if this helped leave it an upvote 
#rubel1130 :)

Example 2: prime number in python

def prime(num):
    if num>1:
        s=int(num/2)
        for i in range(2,s+1):
            if num%i==0:
                return("not prime")
                break
        return("prime")
print(prime(239))

Example 3: prime checker in python

#make the function
#to do this all hte vairibles go in side the function

def CheckIfPrime ():
    a1 = input("which number do you want to check")
    a = int(a1)#you need the checking number as an int not an str
    b = 2 #the number to check againts
    c = ("yes")
    while b < a:#run the loop
        if a%b == 0:#check if the division has a remainder
            c = ("no")#set the answer
        b = b+1
    print(c)#print the output
CheckIfPrime ()#call the function

Example 4: how to get ********** on python

bruh i just wanted to know the formula thing to get the title to be like ****yo*****