Python Codes Basic to Advance
Ir al canal en Telegram
Python Codes Basic to Advance All Codes @C_Codes_pro @CPP_Codes_pro @Java_Codes_Pro @nodejs_codes_pro Discussion @bca_mca_btech
Mostrar más2 813
Suscriptores
Sin datos24 horas
-47 días
-2430 días
Archivo de publicaciones
n = int(input("Enter num: "))
for i in range(n, 0, -1):
print(" "* (n-i), end="")
for j in range(i):
print("*", end="")
print()
"""
Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
*****
****
***
**
*
"""n = int(input("Enter num: "))
for i in range(n):
print(" "* (n-i), end="")
for j in range(i+1):
print("*", end="")
print()
"""
Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
*
**
***
****
*****
"""# basic astrics triangle shape 2 pattern
n = int(input("Enter num: "))
for i in range(n, 0, -1):
for j in range(i):
print("*", end=" ")
print()
"""
Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
* * * * *
* * * *
* * *
* *
*
"""# basic triangle shape pattern
n = int(input("Enter num: "))
for i in range(n):
for j in range(i+1):
print("*", end=" ")
print()
"""
P
*
* *
* * *
* * * *
* * * * *
"""# basic astric's square shape pattern
n = int(input("Enter num: "))
for _ in range(n):
for _ in range(n):
print("*", end=" ")
print()
"""
P
* * *
* * *
* * *
"""# basic pattern 2 without numbers
n = int(input("Enter num: "))
for _ in range(n):
print("*", end= " ")
"""
P
* * * * *
"""# basic pattern in reverse
n = int(input("Enter num: "))
for i in range(n, 0, -1):
print(i, end=" ")
# pattern # 6 5 4 3 2 1
n = int(input("Enter num: "))
for i in range(1,n+1):
print(i, end=" ")
"""
Learn coding:
https://t.me/addlist/2UhsQW_cGzkxMzg1
1 2 3 4 5 6 7
"""#python to copy text into clipboard
Install playsound modules using
pip install pyperclip....Chatgpt on WhatsApp
Yatter in..
Link :- https://wa.me/919811046549?text=Hi%20Yatter
Join Coding: http://Telegram.me/addlist/2UhsQW_cGzkxMzg1
in this article, we will see how to use Python's Wikipedia API to fetch a variety of information from the Wikipedia website.
Installation
Wikipedia API. This can be done by entering the command below in your command prompt or terminal:
$
pip install wikipedia
# rest cheakout the code# Events example in Python
class EventEmitter:
def __init__(self):
self.funcs = []
def on(self, mesType, callback):
self.funcs.append({'mesType': mesType, 'callback': callback})
def emit(self, mesType, obj):
for funobj in self.funcs:
if funobj['mesType'] == mesType:
funobj['callback'](obj)
# Now use of this EventEmitter class
e = EventEmitter()
def func(ob):
print("Event message 1st listener: " + ob)
def func1(ob):
print("Event message 2nd listener: " + ob)
def abcc(ob):
print("Event abc listener: " + ob)
e.on('message', func)
e.on('message', func1)
e.on('abc', abcc)
# Emitting Events
mes = input('Enter anything for message Event: ')
e.emit('message', mes) # emitting message Event
abc = input('\nEnter anything for abc Event: ')
e.emit('abc', abc) # emitting abc Event
# Share: Telegram.me/addlist/2UhsQW_cGzkxMzg1#python music player
Install playsound modules using
pip install playsound in terminal
give location of ur file in playsound(#path)
Note:- \ is escape sequence character .Coding: https://t.me/addlist/2UhsQW_cGzkxMzg1
Join : @python_codes_pro
#Table using python of any number
num = int(input("Enter any number: "))
for i in range(1, 11):
print(f"{num} * {i} = {num * i}")
# Join : @python_codes_pro