סוגי מספרים - integer או float
- eddiearb
- Apr 1, 2019
- 1 min read
סוגי מספרים - integer או float
אפשר לראות שהתוצאה של השורש הריבועי של 16 היא 4.0 ולא סתם 4 וזה קשור לסוג הערך שאנו מקבלים לאחר הוצאת שורש- מספרים שלמים הם ערכים מסוג integer, ומספרים עשרוניים (0.25 למשל) הם ערכים מסוג float. בפייתון גם מספרים שלמים יכולים לקבל ייצוג כמספרים עשרוניים (שהם ערכים מסוג float), למשל 2.0. בפייתון כאשר מבצעים פעולת שורש או חילוק, באופן אוטומטי מתקבל ערך עשרוני מסוג float, גם אם תוצאת החילוק או השורש היא מספר שלם. ולכן אנו מקבלים 4.0 שהוא ערך מסוג float.
למדנו עד כה כי ערכים יכולים להיות מסוג string , integer או float - דוגמאות -
String integer float
"two" 0 3.0
'd"d' 223 0.0
'123' -10 1.234
I really enjoyed your post—it highlights the seamless and secure gaming experience well. Fairplay24 truly delivers with intuitive registration, strong security, and a user-friendly design. The Fairplay24 login is especially impressive—fast, reliable, and encrypted for full data protection. Your review perfectly captures that balance of functionality and trust, which makes all the difference for users exploring gaming platforms. Would love to hear how your experience compares!
Team Fairplay24
https://fairplay24.world/
Hello! I found the perfect cordless impact driver at www.ukplanettools.co.uk/cordless-power-tools/cordless-impact-driver/l/manufacturer:makita/. The power and precision of this tool make it stand out from others I’ve tried. It’s compact, easy to handle, and delivers excellent torque. The cordless feature lets me work anywhere without fuss. UK Planet Tools also provided fast delivery and excellent service.