Talk:Python (programming language)
Notfruit (talk) 01:03, 4 January 2016 (UTC)Reply
To-do list for this page
- Add history
- Way more detail on syntax
- Implementations
- Usage
Notfruit (talk) 01:03, 4 January 2016 (UTC)
- Hello Mates,
- After reading the following article "https://optymize.io/blog/python-install-mac-tutorial/" I feel like this will be the best source for this page. Please review it and let me know if the article is good to add to the Reference section.— Preceding unsigned comment added by Aatifnation90288 (talk • contribs) 15:52, 21 March 2023 (UTC)
- @Aatifnation90288: How would a mac installation tutorial be the best source? DingoTalk 15:57, 21 March 2023 (UTC)
C.S.
A=int(input ("enter no."))
2402:8100:2732:EBBD:79F1:6D9C:F55A:6C42 (talk) 16:40, 10 July 2025 (UTC)
- For this:
A=int(input ("enter no."))
print(A)- If input is 1, it prints 1 to the console.
- If input is A, it throws an error (
ValueError: invalid literal for int() with base 10: 'A'). - So, try this:
- def inpnum()try:return int(input("Enter number: ")except ValueError:return inpnum() # Note that this will cause a RecursionError if this is called too many times, but this shouldn't be a worry.
print(inpnum()) - This implements what is known as a try-catch block, so the program doesn't halt when it encounters the error. Hope this helps! SeaDragon1 (talk) 15:21, 11 February 2026 (UTC)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.