Python 3 - Using True and False

Опубликовано: 08 Май 2026
на канале: Computing and ICT in a Nutshell
35,427
201

A look at how you can use True and False in your programming - not just to set the value of a Boolean variable, but also to display alternative text, increment scores or perform calculations.

Prime numbers: https://console.basthon.fr/?from=http...
Fuller coin flipping example: https://console.basthon.fr/?from=http...

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).

Longer description on using arrays/tuples/lists instead of IFs:
https://www.advanced-ict.info/blog/ar...

Scaling random numbers and changing their distribution:
https://www.advanced-ict.info/blog/sc...

You can also see the resources for learning to program on the Computing and ICT in a Nutshell website: https://www.advanced-ict.info/program...