-
-
Notifications
You must be signed in to change notification settings - Fork 3
π Tutorial: Intro to Print Functions
In our Installation and Setup lesson, we learned how to access the Simpl-Py interpreter. We will need the interpreter for every lesson. If you want to display some text in the terminal, we can use the basic print function. This function can be accessed by returning print and telling Simpl-Py what to print.
In your terminal, return the print command (shown below):
>>> print
Next, Simpl-Py will ask you what to print. Return
Hello World:
Print What? Hello World
As you can see, the same text you returned was printed onto the display:
Hello World
π Congrats! You have just used your first Simpl-Py command! Lets look at some other print commands.
The basic print function is a base function. Before you think the print function (or even Simpl-Py) is boring, lets learn some more functions contained inside the print handler.
This command takes text and prints the same text but in lower case. Follow along:
In your terminal, return
print.lower:
>> print.lower
In response to "Lower What?", return
SIMPLE python:
Lower What? SIMPLE python
Simpl-Py will print the result:
simple python
This command (you guessed it) prints the uppercase version of some text:
Return
print.upper:
>> print.upper
Return
SIMPLE python:
Upper What? SIMPLE python
The result:
SIMPLE PYTHON
π Congrats! You have just learned 2 more print commands!
Stay tuned for our Advanced Print Commands lesson to learn how to print text hundreds (or even thousands) of times.
<previous< / -home- / >next>
| Quick Links: | Quick Start Guide | Simpl-Py Tutorial | Library Reference | What is Simpl-Py |
|---|
- Library Reference
-
Tutorial Home
- Intro
- Installation and Setup
- Intro to Simpl-Py Processes
- Commenting
- Intro to Print Functions
- Variables
- Print Math Function
- Base Functions
- Slash Functions
- Simpl-Py Handling
- Intro to Errors
- Advanced Print Functions
- Intro to TXT Functions
- Intro to Call Numbers
- Errors with Developer Mode
- Advanced TXT Functions
- Advanced Call Numbers
- Intro to Modules
- Beta Mode
- Custom Modules
- Advanced Modules
- Future and Your Help