Ask coding questions

← Back to all posts

Hello, I am working on this "Functions" repl with some useful mathematical functions. I am running out of ideas. I am a 6th grade student, so I have alot of free time after finishing my work. Does anyone have ideas? I would be more that happy to try out some ideas!


A function to calculate the scalar product of vectors, just an idea


@JacksonCowie, Thank you, I will do that


@JacksonCowie , I am using either
import numpy
result = numpy.array(A)[:,0], B)


sum( [a[i]*b[i] for i in range(len(b))] )


@hendryxu I'd just go with the second one, no need to import a module - Unless you are going to use it again in a separate function that actually requires numpy.