Python: Challenges and Solutions (Chapter 1. Getting Started. The Game Over Program).

We continue to learn programming. After the second chapter in the book: Michael Dawson “We Program in Python”, 2014 (Michael Dawson “Python Programming for the Absolute Beginner”, 3rd Edition), where I studied the features of working with text in the Python programming language, tasks were offered. Let’s do them together. I will give my solution, and you write your options in the comments.

1) Learn how to trigger a bug: Interactively enter the name of your favorite ice cream brand. Then fix the error and create a command that will correctly display the name on the screen this type of ice cream.

2) Write and save a program that prints your name and waits for the user to press Enter to exit. Launch this program by double-clicking on its icon.

name=input('Твое имя?\n')
print(input('Нажмите Enter для выхода'))

3) Write a program that will display your favorite aphorism on the screen. Do not forget that the author of the aphorism should be mentioned on a separate line.

print('\'Просто иди!\'')

This entry was posted in Python (en). Bookmark the permalink.

Leave a Reply

🇬🇧 Attention! Comments with URLs/email are not allowed.
🇷🇺 Комментарии со ссылками/email удаляются автоматически.