How to Code and View Results in Real-Time
CodeFriends offers a practice environment where you can learn Python and view code execution results in real-time without the need to install a complex development environment. All you need is your browser.
How do you print what you want on the screen?
Just like the word "print," you use print()
and place the desired content inside the parentheses.
To check the results of your Python code in real-time in the practice screen, you must wrap what you want to check with the print function.
Note: In a program, a
function
is a block of code designed to perform a particular task.
name = "CodeFriends" # Assign "CodeFriends" to the variable name print(name) # Print the value of the variable name
A variable
is a storage location in a program that holds a value, and the print()
function outputs the value inside the parentheses.
We will cover variables and functions in more detail in future lessons.
Coding Practice
Enter the code print(1 + 2)
in the practice code editor.
For code readability, make sure to include a space on either side of the addition sign (+).
print(1 + 2)
Guidelines
AI Tutor
Publish
Design
Upload
Notes
Favorites
Help
Code Editor
Execution Result