Back to Browse

Python 3 - Using Lists/Tuples Instead of IF

594 views
Oct 4, 2018
9:23

See how you can use arrays/lists/tuples instead of multiple IFs to create a shorter, clearer and more easily-extended program. You can read more about using arrays/lists/tuples for selection here: https://www.advanced-ict.info/blog/arrays-selection.html You can look at the improved version of the Magic 8 Ball program here: https://console.basthon.fr/?from=https://advanced-ict.info/programming/examples/Python/magic_8_ball.py NB. I have switched from Replit to Basthon since making the video - click the Exécuter button to run the programs above (and make sure you say No to your browser translating the page).

Download

1 formats

Video Formats

360pmp411.7 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Python 3 - Using Lists/Tuples Instead of IF | NatokHD