A number from input · ตัวเลขจากอินพุต
A number from input
Read a whole number and print it doubled. For the input 7, print 14.
⚠️ input() always gives back text, even when you typed digits — "7" * 2 is "77". Wrap it in int(...) to get a number you can do arithmetic with.
จำนวนจาก input
อ่านจำนวนเต็มและพิมพ์มัน สองเท่า. สำหรับ input 7, พิมพ์ 14
⚠️ input() จะ Always ย้อนกลับเป็น ข้อความ เสมอ แม้ว่าคุณจะพิมพ์ตัวเลข — "7" * 2 คือ "77". ห่อด้วย int(...) เพื่อรับค่าที่เป็นจำนวนที่สามารถคำนวณทางคณิตศาสตร์ได้
Read a whole number and print it doubled. For the input 7, print 14. · อ่านจำนวนเต็มและพิมพ์มัน สองเท่า. สำหรับ input 7, พิมพ์ 14
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่