Dec-14-2018, 11:25 AM
Dec-14-2018, 11:28 AM
What do you think? Did you try to run it if not able to say just from looking at it?
Dec-14-2018, 11:34 AM
It would have been faster and more efficient to type the same code in the python interpreter instead of the forum!
Dec-14-2018, 02:00 PM
The output is:
Output:'this sounds like homework'
Dec-14-2018, 02:05 PM
If you are on linux, just enter on your keyboard :
python3
If you are on windows, download the last release on :
https://www.python.org/downloads/windows/
If you cannot install because you don' have administrative access... try to find some web site with a python terminal for free.
You can also buy a raspberrypi (arround 10$), but you will need also a screen and a keyboard (take them from the pc you used for the forum), and you will have to download and install raspbian.
If you fail with all of that, read the doc : https://docs.python.org/3/tutorial/index.html , your brain will give you the answer quickly.
python3
If you are on windows, download the last release on :
https://www.python.org/downloads/windows/
If you cannot install because you don' have administrative access... try to find some web site with a python terminal for free.
You can also buy a raspberrypi (arround 10$), but you will need also a screen and a keyboard (take them from the pc you used for the forum), and you will have to download and install raspbian.
If you fail with all of that, read the doc : https://docs.python.org/3/tutorial/index.html , your brain will give you the answer quickly.
Dec-15-2018, 06:05 AM
The output is ‘abcdefghij’. The first slice gives us ‘abc’, the next gives us ‘defghij’.