The first thing we are going to do is teach the computer to communicate with us. Computers can answer many different questions, and to accomplish that, we will learn how to interact with our computer to tell it to “talk” to us.
The commands in Python are very intuitive and are sometimes very similar to the English language. The first command we will cover in this course is the print() statement.
We can use the print() command to print text in the output. For instance, this program prints Hi, my name is Python:
print('Hi, my name is Python')
Note that after print() there is an opening bracket and a closing bracket at the end. This tells Python where the printing statement starts and ends. Between the brackets, we can put textual values which are inside either single quotes '' or double quotes "". Python treats both single and double quotes the same. So, the following two programs are identical:
print('Hello')
print("Hello")
Both of these programs will print Hello in the output.
First challenge
Write a program that would print Hi, I am starting to learn Python in the output.
Hit the RUN button to see if the program behaves correctly.
Hit the SUBMIT button to evaluate the program.
If everything is correct, the first exercise will turn green and will be marked as completed!
💡
Note that the output of your program should exactly match the expected output.