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
My teacher told: if not sure — use brackets. + Visually more clearly.
Читать полностью…
so
def average(nums):Читать полностью…
return sum(nums) / len(nums) if nums else None
0 is the wrong value as average for empty list
None would be more suitable
For instance, in NestJS, developers can generate default controllers, services, and modules by executing specific commands. Similar to Node.js, a project can be initialized using the npm init command. These commands establish a standardized file structure, eliminating the need for developers to manually recreate repetitive directory layouts. This approach provides a consistent architectural framework, although adherence remains at the developer's discretion. Regarding AI-generated code, while such tools exist, it remains essential for developers to review and understand the output produced by these systems.
what is the point of boilerplate code? Also, AI can generate most of it these days
Читать полностью…
def average(nums):Читать полностью…
try:
return sum(nums) / len(nums)
except ZeroDivisionError:
return None
for zero division error, do this:
if len(nums) == 0:
return 0
I do think that's a homework
though even for that, you didn't explain what was your question
You cannot ask people to let the auto random test somewhere pass
Which is the best tools or package to creating a cross-platform desktop app(with python)?
Читать полностью…
It is not library but it is framework which works with MVT architecture 🙏
Читать полностью…
hold on, the expression if ... else ... has the lowest priority
Читать полностью…
Check it. Possible you need a brackets for expression.
Читать полностью…
'Try except' is too expensive operation. Better use if in this case.
Читать полностью…
https://www.libhunt.com/l/python/topic/boilerplate
Or look at: https://python-boilerplate.github.io/
i m just new to this. willing to start coding journey with python .. i know the basic like functions pointers loops etc of c++ but willing to start seriously n systematically with python .. whats some platfrom that i can use
Читать полностью…
Is there a Python library available to assist developers with boilerplate code, similar to the functionality provided by Node.js or NestJS?
Читать полностью…
everything is 0/0 which will give you an error.
what is the score atleast
Initial score with numbers like this:
scores = [50, 60, 70, 60]
Also it's gonna be helpful if you learn CSS separately.
Читать полностью…
PySide6 is powerful
gives a native look across platforms, free for commercial use, and beats Kivy and wxPython in features. just expect a larger file size and a learning curve.
model(m) = model (m)
view(v) = controller (c)
template(t) = view (v)
Please is it MVT or MVC as in MODELS, VIEWS AND CONTROLLERS?
Читать полностью…
Django is one of the python libraries to develop web applications. It already contains many readymade web development frameworks.
Читать полностью…