Hello All, I am new in python programming and got the opportunity to work on a large project which is based on finance domain. I want to know which python framework is more flexible between Flask and Django in a large project. I have asked this quey on Quora and according to this source, Django...
Hi!
I'm currently working on my university project. the link to the article which I'm referencing is Accelerating supply chains with Ant Colony Optimization across a range of hardware solutions and its dataset is available Supply Chain Logistics Problem Dataset.
I would appreciate it if there is...
New to python3 working on a fantasy character generator, tyring to find the best way to rerun the snippet of code if the wrong letters are entered in input.
Thanks for any help you can give me.
#Code to exit or reginirate script
quittogen = input("""\nDo you want to quit or generate another...
Hi, how can i change this code to work for two-digit numbers or three-digit number?
For now only work for single digit numbers, tried to change algorthm but didnt work.
def to_number(digits):
result=digits[0]
for el in digits[1:]:
result=result*10
result=result + el...
I'm trying to get data from my temperature and humidity sensor and write the data to a JSON file every minute. I started learning Python two days ago, so I have no idea why these errors occur (the output is in the attachment):
The Code:
import time
import board
import adafruit_dht
import...
Hi, I'm working on a small game where the computer generates a number, and you have to input (like guess) a random number. Then, the computer will tell you whether the guessed number is too big or too small, or if you guessed it right.
I might not have imported the random number correctly, but...
Hello, I wanted to ask for a shortcut to mark multiple lines and put them as comment, I don't mind if each line has # at the beginning
for example:
The code is:
1. print("hello world")
2. print("hello world")
3. print("hello world")
I want to make it:
1. # print("hello world")
2. # print("hello...
This is what I have so far. I'm told it's not acceptable. Any ideas on a different way to do this? I have to use loops
def print_pyramid(str,h):
if str=="right":
for i in range(h):
print('#' * (i+1))
elif str=="left":
for i in range(h):
print('...
<start = dt.datetime(2022,1,1)
end = dt.datetime(2023,1,1)
dates = pd.date_range (start,end,freq='20D')
print(dates)>
I am the definition of a newbie to python, not to mention the pandas extension, That being said is there any way that I can have the pd.date_range() line count from the end...
Hello everyone!
I am kind of new in programming and I have some troubles learning and I was wondering; is programming really for everyone?
I am 19 years old and I've been mostly editing codes rather then making own (with no intention of stealing but just messing around to have fun).
I've tried...
Please find attached a screenshot of an error message pertaining to my code from an exercise in list methods in Python, specifically count() and index(). If anyone has any constructive criticisms or suggestions, I will be most grateful. Many thanks in advance for all your help.
Hi all, first post here.
Working on a project for corp, we take in lots of emails and need to process them accordingly, my role is to automate this process however possible..
What I've done so far:
- Grab the email, convert it out of .msg format and into a more friendly format.
- Developed the...
Please see a directive which I am having trouble fulfilling:
# Use upper() on place: place_up
place_up = upper(place, place_up)
I received this error message:
NameError: name 'upper' is not defined
Please see the code in context, attached. There are probably more errors which I have not...
import cv2
damaged_image = cv2.imread("Corrupted.png")
mask = cv2.imread("mask.png", 0)
output = cv2.inpaint(damaged_image, mask, 1, cv2.INPAINT_TELEA)
cv2.imshow('test', output)
cv2.waitKey(0)
cv2.destroyAllWindows()
I couldn't generate mask with python, i have drawn the mask by using Paint...
Hi,
I'm having some issues with this section of my code, it has errors in Terminal and the feedback isn't very specific. Thanks!!
import turtle
import time
variable1=turtle
# turtle object
#img_turtle = Turtle.fish()
#turtle.register_shape('turtle.gif')
#img_turtle.shape('turtle.gif')
speed =...
Suppose every day you wake up and you are randomly in a GOOD mood 60% of the time or in a BAD mood 40% of the time. Furthermore, anytime you have a quiz or test in a course, the grade you receive is also random based on the following:
If you take a quiz or exam when you are in a GOOD mood...
Hi, im currently using Python's Flask to create a dashboard and on one route I'd like to render an html template that turns a local json file into a table. When using getJSON for some reason the localhost/server cannot find the file no matter how I've defined the path so the table always only...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.