![]() |
int(3) and int('3') is there a difference? (python3.5) - Printable Version +- Linux Lite Forums (https://www.linuxliteos.com/forums) +-- Forum: Development (https://www.linuxliteos.com/forums/forumdisplay.php?fid=7) +--- Forum: Coding (https://www.linuxliteos.com/forums/forumdisplay.php?fid=33) +--- Thread: int(3) and int('3') is there a difference? (python3.5) (/showthread.php?tid=5981) Pages:
1
2
|
Re: int(3) and int('3') is there a difference? (python3.5) - bitsnpcs - 02-06-2019 I use paper copies of the books too, I find pdf's very hard to use when learning but read other books as these. So tend to use the paper books. I have this stand for whichever book I use it has two bars to hold it open on the page you choose I put this next to the monitor to its right then I can read from it and the screen, with no light or info changes on screen. It has been really useful. You can tilt the angle of it there are steps/slots at the back and a bar to slot in to whichever angle you want. Cracking Codes with Python is interesting it has a lot of historical information of how code was used for privacy and the methods. One day I'll get around to going to visit Bletchley Park, I liked the Drama show about it too. It was where they cracked the codes in WW2, one group of the crackers were all women. Other Python books I have are - The definitive Guide Series - Python - the beginners guide, I have used a fair amount of this. Make games with Python - it is a Raspberry Pi book, available free as a pdf too, on MagPi website. Think Python - O'Reilly My partner got me these ones at christmas and said to do them in this order after all of the first books above - Effective Computation in Physics Learning Python Programming Python Python Pocket Reference The Learning & Programming Python books are aka "the pink kettle bells", as this is what I was told was inside the box, my extraction of info is obviously in serious need of improvement based on that fail lol. Re: int(3) and int('3') is there a difference? (python3.5) - freemedia2018 - 04-05-2019 Python is one of my favourite languages. I think they only mentioned int('2') to demonstrate that int() can convert string data to integer data. Quote:So its a string that can be added, multiplied, divided etc? No, a string is more like a list of characters. If you multiply a string by a number, you get a string: Code: print("l" + "ol" * 5) An integer is a numeric value that rounds to the nearest whole number. If you multiply an integer by another numeric value, you get a numeric value. Code: print(2.7 * 5) type is a great command in Python. Here are some things you can try: Code: >>> type('5') |