Python Question / Quiz; What is the output of the following Python code, and why? 🤔🚀 Comment your answers below! 👇 #python #programming #developer #programmer #coding #coder #softwaredeveloper #computerscience #webdev #webdeveloper #webdevelopment #pythonprogramming #pythonquiz #ai #ml #machinelearning #datascience
@Python_Dv 5 * factorail(5 -1 ) 5 * 4! 5 * (4*3*2*1) 5 * 24 = 120
@Python_Dv AI said correct answer is C Here is why:
@Python_Dv C)declare function factorial and assing parameter n since n is not equal to zero move to second loop. Compute factorial which computes to 120
Preem art, straight from Night City! Officially licensed Cyberpunk 2077 metal posters for chooms who know. Get yours now!
@Python_Dv Yep, it's c) 120. Recursive magic at work! 🧙♂️