Created
November 9, 2024 11:59
-
-
Save sunmeat/8b9e0c65d724ecc4c4840408d0a47d10 to your computer and use it in GitHub Desktop.
приклад на введення даних в Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = input("Введiть ваше iм'я: ") | |
print(f"Привiт, {name}!") | |
age = int(input("Ваш вiк: ")) | |
# price = float(input("Введiть цiну: ")) | |
age = age + 1 | |
print(age) | |
########################################################### | |
# продвинуте введення: | |
# data = input("Введiть числа через пробiл: ") | |
# numbers = [int(x) for x in data.split()] | |
# print(f"Числа: {numbers}") | |
# with open('C:/!Files/text/kobzar.txt', 'r') as file: | |
# data = file.read() | |
# print(f"Контент файлу:\n{data}") | |
# import getpass | |
# password = getpass.getpass("Введiть ваш пароль: ") | |
# print(f"Ваш пароль: {password}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment