def proc(x): return 2*x*x def main(): x = 10 proc(x) print(x) print(proc(x)) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

def proc(x): return 2*x*x def main(): x = 10 proc(x) print(x) print(proc(x))

Why is this code showing "no output"???

22nd Jun 2021, 10:44 PM
Al-hassan Rabi'u
Al-hassan Rabi'u - avatar
2 Answers
+ 2
Because you aren't calling the main function by doing, main()
22nd Jun 2021, 10:49 PM
Abhay
Abhay - avatar
+ 1
https://code.sololearn.com/cBwgp1qetHQH/?ref=app https://code.sololearn.com/cTHRZ8i0Hk8z/?ref=app Abhay is right , you have declared a function, but not called it!
23rd Jun 2021, 1:56 AM
Abhiyantā
Abhiyantā - avatar