135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
For a web crawler project, which library is the best to use? Currently, I'm a beginner and it's hard for me to write the program independently without following the books. I'm currently using requests and BeautifulSoup. I'm worried that my learning method might be wrong, so I'm here to ask for advice.
Читать полностью…
You may want to start reading flask documentation
Is not effective to just ask to explain a full program better to be more specific
Please don't send useless messages. Also, please delete all those useless messages you have already sent! (rule #3)
Читать полностью…
Python groups in other languages
(⚠️Not managed by us ‼️)
Arabic @arabipython
Azerbaijani @azepug
Chinese @pythonzh
French @python_francais
German @pythonde
Hebrew @pythonisrael
Tamil @pythontamilcommunity
Indonesian @pythonid
Italian @python_ita @pythonita
Kazakh @python_kz
Malaysia @pythonmalaysia
Persian @pyfarsi
Portuguese @pythonbr
Russian @ru_python_beginners @ru_python @python_scripts
Spanish @PythonEsp
Swahili @python_eafrica
Turkish @python_tr
Uzbek @python_uz
If you have an active and well managed group that you want to be listed there, ask in the Meta group, link in the rules page.
You can download tonny IDE.
It's simple and easy to download
All.. I have been searching on Google an "easy to use" python ide.. and I did download a few and tried using.. but did not find simple and so removed.. any here can suggest me a simple and easy IDE
Читать полностью…
Hello Greetings to you. may peace, mercy and blessings of almighty be upon you. how are you doing guys
Читать полностью…
Check out @PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Читать полностью…
What have you tried to do, to solve that issue?
Show your code (read rule 5️⃣ first) and explain where, and why, you're stuck.
in rule no.5 (screenshot not mentioned), so can i share screenshot too?
5️⃣ Code sharing
• Be considerate!
• Try to use markdown formatting!
• For many lines (5-10+) of code, use a pasting service:
• dpaste.org
• hastebin.com
• Don't ever attach photos or videos of your screen taken with your phone camera!
Or just import the random module and use the random.randint() function.
Читать полностью…
Hi everyone, I can't solve the loop problems in Python.
- Write a program—a "surprise pie" simulator—that, when launched, displays one of five different "surprises", chosen randomly.
- Write a program that "flips" a virtual coin 100 times and reports how many times heads came up, and how many times tails.
- Modify the "Guess the Number" program so that the player has a limited number of attempts. If the player does not guess the correct number (and loses), the program should output the harshest possible message.
- And here is a more complex task. Write a pseudocode algorithm for a game in which a computer guesses a number between 1 and 100, and the person thinks of a number. Before starting to write the code, think about what the optimal guessing strategy should be. If your pseudocode algorithm is successful, try implementing the game in Python.
Someone shared me this code pls explain :
from flask import Flask, render_template, request, redirect, url_for, flash, session, abort
from flask_sqlalchemy import SQLAlchemy
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, TextAreaField, SubmitField
from wtforms.validators import DataRequired, Length
from passlib.hash import bcrypt
from datetime import datetime
app = Flask(name)
app.config['SECRET_KEY'] = 'replace-this-with-a-secure-random-string'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///progsite.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
# ---------- Models ----------
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
password_hash = db.Column(db.String(255), nullable=False)
is_admin = db.Column(db.Boolean, default=False)
def verify_password(self, password):
return bcrypt.verify(password, self.password_hash)
class Problem(db.Model):
id = db.Column(db.Integer, primary_key=True)
title = db.Column(db.String(200), nullable=False)
statement = db.Column(db.Text, nullable=False)
sample_input = db.Column(db.Text, default='')
sample_output = db.Column(db.Text, default='')
created_at = db.Column(db.DateTime, default=datetime.utcnow)
class Submission(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
problem_id = db.Column(db.Integer, db.ForeignKey('problem.id'))
code = db.Column(db.Text, nullable=False)
verdict = db.Column(db.String(50), default='Pending')
created_at = db.Column(db.DateTime, default=datetime.utcnow)
user = db.relationship('User', backref='submissions')
problem = db.relationship('Problem', backref='submissions')
# ---------- Forms ----------
class RegisterForm(FlaskForm):
username = StringField('Username', validators=[DataRequired(), Length(min=3, max=80)])
password = PasswordField('Password', validators=[DataRequired(), Length(min=6)])
submit = SubmitField('Register')
class LoginForm(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
submit = SubmitField('Login')
class ProblemForm(Flask
Hi everyone, in django
I have model class Teacher, subjects
I want to do make function to export excel data from database, subjects when I choose one teacher , their subjects will be added to excel
In my opinion, it would be more efficient to go ahead and install VSCode or PyCharm. But if you insist try online-python.com.
Читать полностью…
Rules in our groups are strictly enforced. It is strongly recommended to read our rules before engaging in any other activity!
Читать полностью…
https://wiki.python.org/moin/BeginnersGuide/NonProgrammers
Читать полностью…
I’m a beginner and I want to learn Python. Please tell me
Читать полностью…
i m unable to solve specific pyton pattern problems (diamond pattern) ,
can i ask problem related to that here?
Why would you use something as massive as numpy for a thing that the standard library can do https://docs.python.org/3/library/random.html
Читать полностью…
bro i don’t recommend telebot, aiogram seems to be much better.
at the start telebot is easier but its for noobs, at some point telebot won’t be enough and you will restudy for aiogram
the main difference is that aiogram is async and telebot is sync and its bad yk