1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Creating a multiplying function

Discussão em 'Python' iniciado por Stack, Novembro 23, 2025.

  1. Stack

    Stack Membro Participativo

    I don't understand how to make a function and then make it work which will allow me to multiply. For E.g.

    def Multiply(answer):
    num1,num2 = int(2),int(3)
    answer = num1 * num2
    return answer

    print(Multiply(answer))


    I Had a go at making one and didnt work so the one below is where i found on internet but i have no idea how to make it work as in print out the numbers timed.

    def multiply( alist ):
    theproduct = 1
    for num in alist: theproduct *= num
    return theproduct

    Continue reading...

Compartilhe esta Página