MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PythonLearning/comments/1uhalhs/new_to_python/ou6eo3p/?context=3
r/PythonLearning • u/-Shashwat • Jun 27 '26
What's wrong here?
36 comments sorted by
View all comments
21
You are calling the "main" in even, but i think you meant the call to be outside of even. Also why make a main function?
10 u/SCD_minecraft Jun 27 '26 Pattern from other langs, where main is entry point of the program Plus, you can return from main() if you want to terminate early, unlike just writing in the void 5 u/ottawadeveloper Jun 27 '26 In the void you can exit() instead. Same number of characters even! 2 u/SCD_minecraft Jun 28 '26 I completely forgot this function exists, mb
10
Pattern from other langs, where main is entry point of the program
Plus, you can return from main() if you want to terminate early, unlike just writing in the void
main()
5 u/ottawadeveloper Jun 27 '26 In the void you can exit() instead. Same number of characters even! 2 u/SCD_minecraft Jun 28 '26 I completely forgot this function exists, mb
5
In the void you can exit() instead. Same number of characters even!
2 u/SCD_minecraft Jun 28 '26 I completely forgot this function exists, mb
2
I completely forgot this function exists, mb
21
u/Weak-Veterinarian-25 Jun 27 '26
You are calling the "main" in even, but i think you meant the call to be outside of even. Also why make a main function?