Writing Lines of Code
In this chapter, you will get your first experience writing actual code. Our hope is that you will see how easy it can be, but if it presents challenges, don't be discouraged.
The Print Statement
In Python, the command print tells the program to display words or numbers on the screen. Here is a line of code that tells Python to display the words 'Hello, kitties!'
print("Hello, kitties!")
print is a keyword -- that is, a word, that has special meaning for Python. It means, 'Display what is inside the parentheses'.
print is not capitalized. If you capitalize it, the program will not run.
Well, let's practice a little?
Swipe to start coding
You should type in the console the chocolate you like. Well, for example "I like dark chocolate" or maybe "I like milk chocolate". Try yourself.
Click button below code to check the solution of this task.
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Awesome!
Completion rate improved to 5.88
Writing Lines of Code
Swipe um das Menü anzuzeigen
In this chapter, you will get your first experience writing actual code. Our hope is that you will see how easy it can be, but if it presents challenges, don't be discouraged.
The Print Statement
In Python, the command print tells the program to display words or numbers on the screen. Here is a line of code that tells Python to display the words 'Hello, kitties!'
print("Hello, kitties!")
print is a keyword -- that is, a word, that has special meaning for Python. It means, 'Display what is inside the parentheses'.
print is not capitalized. If you capitalize it, the program will not run.
Well, let's practice a little?
Swipe to start coding
You should type in the console the chocolate you like. Well, for example "I like dark chocolate" or maybe "I like milk chocolate". Try yourself.
Click button below code to check the solution of this task.
Lösung
Danke für Ihr Feedback!
Awesome!
Completion rate improved to 5.88single