Python Codes Basic to Advance
2.66K subscribers
82 photos
5 videos
8 files
100 links
Python Codes Basic to Advance

All Codes
@C_Codes_pro
@CPP_Codes_pro
@Java_Codes_Pro
@nodejs_codes_pro

Discussion
@bca_mca_btech
Download Telegram
Writing Our First Python Program
Today we will be writing our first program in Python Language. I know you have been waiting for a long to do this.

Let's get to business and start writing our first python program. Follow the below steps:

Open VS CODE / PYDROID OR ANY IDE and create a new file in it.
Keep in mind the file name should not match any module name.
After creating a new file, type:
print("Hello World")
Now run your program.
You will get the output as
"Hello World" in your terminal.
So, this is our first python program, and in this program, we just used the print function. In this function, whatever we pass in parenthesis () in a double quote or single quote gets printed (as it is) in the terminal.


Eg : print('Hello')

       print("Hello")
print("""Hello""")
      
Correct Method

    print("Hello)
    print(Hello")
    print('Hello)
    print(Hello')

* Wrong method 

Watch :- https://clipchamp.com/watch/NHACKV5pkfE




Task : print "hello world" in support group
👍8
Thanks all for

100 on @Python_group_pro
1000 on @Python_codes_pro

Stay connected with us
https://t.me/addlist/2UhsQW_cGzkxMzg1
👍1
PYTHON .pdf
553.8 KB
COMPLETE GIVEN TASK IN PDF AND SEND SOLUTION BY TODAY .
Join :- @Python_Codes_Pro

Support group : @python_group_pro
python comment.pdf
662.1 KB
Comments in python


COMPLETE GIVEN TASK IN PDF AND SEND SOLUTION BY TODAY .



Join :- @Python_Codes_Pro

Support group : @python_group_pro
Everything related to coding 👇
https://t.me/addlist/2UhsQW_cGzkxMzg1
Random quotes using python.

import requests
url="https://mukesh-api.vercel.app/randomquotes"
print(requests.get(url).json()["results"])

Result :
Friendship is always a sweet responsibility, never an opportunity.

Join :- @Python_Codes_Pro

Support group : @python_group_pro
2
Python Codes Basic to Advance
python comment.pdf
Solve kro 😭👍 nhi to kalse nhi bhej rha pdf
# my own jarvis using python + ai

Source code :- https://gist.github.com/Noob-mukesh/44b174da89726d20eba41aedd769eaac

Rate ❤️😁
3
Python datatype.pdf
1 MB
Datatype in python


COMPLETE GIVEN TASK IN PDF AND SEND SOLUTION BY TODAY .


Join :- @Python_Codes_Pro

Support group : @python_group_pro
1
This media is not supported in your browser
VIEW IN TELEGRAM
try:
from colorama import Fore,Style,Back
except:
import os
os.system("pip install colorama")

n=input("Please enter your Name -> ")
class wish:
"""happy new year wishes class with different color output
by @MR_sukkun
"""
def __init__(self,name):
self.name=name
def __str__(self) -> str:
return f"Happy New Year, {self.name}"
x=wish(n)
COLOR=[Fore.BLACK,Fore.BLUE,Fore.CYAN,Fore.CYAN,Fore.GREEN,Fore.YELLOW,Fore.RED,Fore.WHITE,Fore.MAGENTA]
BACK=[Back.BLACK,Back.BLUE,Back.CYAN,Back.CYAN,Back.GREEN,Back.YELLOW,Back.RED,Back.WHITE,Back.MAGENTA]
STYLE=[Style.BRIGHT,Style.DIM,Style.NORMAL,Style.RESET_ALL]
for i in STYLE:
print(i,x)
for i in COLOR:
print(i,x)
for i in BACK:
print(i,x)
3
This media is not supported in your browser
VIEW IN TELEGRAM
python import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.by import By
song=input("Enter song name : ")
class Lyrics:
def __init__(self,song) -> None:
self.song=song

def lyrics_gen(self) :
driver = webdriver.Chrome()
driver.get(f"https://genius.com/search?q={self.song}")
driver.find_element(By.XPATH,"""/html/body/routable-page/ng-outlet/search-results-page/div/div[2]/div[1]/div[1]/search-result-section/div/div[2]/search-result-items/div/search-result-item/div/mini-song-card/a/div[2]""").click()
page=requests.get(driver.current_url)
soup = BeautifulSoup(page.content, "html.parser")
lyrics=soup.find_all("div","Lyrics__Container-sc-1ynbvzw-1 kUgSbL")
for i in lyrics:
return i.text
x=Lyrics(song)
print(x.lyrics_gen())


# Lyrics Generator using selenium python
Join :- @Python_Codes_Pro

Support group : @python_group_pro
👍31
2
import requests
base_url="https://mukesh-api.vercel.app/"

chat=input("Say something: ")

class Chatbot:
""" Chatbot by @Mr_sukkun """
def __init__(self,chat) -> None:
self.chat=chat

def chat_reply(self) :
url=f"{base_url}chatbot?query={self.chat}"
return requests.get(url).json()["results"]



x=Chatbot(chat)
print(x.chat_reply())


# Multilang Chatbot using Mukesh- Api
🔥21
Which one of the following is not an programming language ?
Anonymous Quiz
64%
HTML
7%
Java
13%
Python
16%
JavaScript
👍1
import requests


ask=input(" Ask anything .")
base_url="https://mukesh-api.vercel.app/"
class GoogleBard:

""" Google Bard ai by @mr_sukkun"""
def __init__(self, ask) -> None:
self.chat=ask

def bard_reply(self) :
url=f"{base_url}bard?query={self.ask}"
return requests.get(url).json()["results"]



x=GoogleBard(ask)
print(x.bard_reply())


# Bard using Mukesh- Api
Join :- @Python_Codes_Pro

Support group : @python_group_pro
3👍1
Forwarded from ˹ᴍʀ sᴜᴋᴋᴜɴ˼ (Mᴜᴋᴇsʜ)
import requests
from io import BytesIO
from PIL import Image
from base64 import b64decode

text=input(" enter text to make blackpink .")

class BlackPink:
base_url="https://mukesh-api.vercel.app/"
""" Google Bard ai by @mr_sukkun"""
def __init__(self, text) -> None:
self.chat=text

def pink_reply(self) :
url=f"{base_url}blackpink/{self.text}"
res=requests.get(url).json()["results"]
photo=BytesIO(b64decode(res.encode("utf-8")))
return photo
#x=Image.open(photo)
#x.save("mukesh35.png")



x=BlackPink(ask)
print(x.pink_reply())



# BlackPink using Mukesh- Api
Join :- @Python_Codes_Pro

Support group : @python_group_pro
2👍1
Forwarded from ˹ᴍʀ sᴜᴋᴋᴜɴ˼ (Mᴜᴋᴇsʜ)
Media is too big
VIEW IN TELEGRAM
fully responsive web🥀
website 🖇: https://mukesh-api.vercel.app/

🥀 sᴜᴘᴘᴏʀᴛ :  @Mr_Sukkun
# python

Simple python GUI calculator.

from tkinter import *
from tkinter import messagebox
top=Tk()
top.geometry('10x40')
top['bg']="red"
uname = Label(top, text="This is a Simple GUI Calculator",bg='green' ,height=2).place(x=150, y=10)
firstnum=IntVar()
secondnum=IntVar()
def add():
f=firstnum.get()
s=secondnum.get()
messagebox.showinfo('Sum is',(f+s))

num1= Label(top, text="First Number" ).place(x=50, y=150)
ent1= Entry(top,bg='white',textvariable=firstnum).place(x=300, y=150)



num2= Label(top, text="Second Number" ).place(x=50, y=250)
ent2= Entry(top,bg='white',textvariable=secondnum).place(x=300, y=250)



btn= Button(top, text="SUM",command=add).place(x=250, y=400)


top.mainloop()

join :- @Python_Codes_Pro

Support group :- @python_group_pro
6👍1