Practice Python : Basic Exercises for Beginners # 003 - User age
Coding exercises with solutions for Python developers.
Practice and quickly learn programming necessary skills by solving Python exercises and problems.
In this video you will learn how to write a program in Python that asks the user to enter his age and display the message “you are of legal age” if the typed age is greater than or equal to 18 and the message « you are a minor » if the typed age is less than 18.
Topics:
the "input()" function : is used to ask the user to enter his age.
The "int()" function : is used to convert user input to an integer.
The conditional statement "if/else": is used to test if the age entered is greater than 18 years old
Видео Practice Python : Basic Exercises for Beginners # 003 - User age автора Питоновская реформа программирования
Видео Practice Python : Basic Exercises for Beginners # 003 - User age автора Питоновская реформа программирования
Информация
2 декабря 2023 г. 4:20:34
00:02:15
Похожие видео