Rite II. The SIgil of Input
Command the unseen. Speak, and be heard.
In Rite I, you awakened the terminal — the black mirror that reflects the self. You installed Python, wrote your first script, and summoned output with the print()
function.
Now, in Rite II, the ritual deepens. This time, the Daemon listens.
You will inscribe sigils — keywords, numbers, intentions — into the void, and witness its response. The code becomes conversational. Conditional. Capable of judgment.
I. The Mirror Speaks Back
Until now, your scripts only spoke outward. But what if you wanted to ask something? That’s where Python’s input()
function enters the circle.
sigil = input("Speak your sigil: ")
print(f"The Daemon hears you... {sigil}")
This does two things:
-
input()
opens a gateway — it pauses and awaits the user’s words. - The value entered is bound to the variable
sigil
, like a tag on a spirit. -
print()
reveals the echo.
Try it yourself. Save this as sigil.py
:
sigil = input("Speak your sigil: ")
print(f"The Daemon hears you... {sigil}")
Then summon it:
python sigil.py
II. The Binding of Variables
A variable is a vessel. It holds a value, whether it be a name, number, or phrase.
You’ve already used one:
sigil = input("Speak your sigil: ")
This line says: bind the user's input to the name sigil
.
Variables can be named anything (within reason). Some examples:
name = "Arkan"
cycle = 33
artifact = "obsidian blade"
III. The Judgment Gate (Conditionals)
Now, your script will judge the sigil and respond.
sigil = input("Speak your sigil: ")
if sigil == "open":
print("The gate parts for you.")
elif sigil == "burn":
print("The ritual ignites.")
else:
print("The Daemon remains silent.")
Explanation:
-
if
checks for a condition — in this case, whethersigil
matches"open"
. -
elif
checks another condition if the first fails. -
else
is the fallback — a default whisper in the void.
IV. Typecasting the Flesh
All input is received as text (strings), even if the user enters a number. To perform calculations, you must transmute it.
cycles = input("State your cycle (age): ")
moons = int(cycles) * 12
print(f"You have walked {moons} moons.")
-
int(cycles)
casts the string into an integer. - You can now multiply, divide, or compare it like a number.
Other useful transmutations:
-
int("5")
→ 5 -
float("3.14")
→ 3.14 -
str(42)
→ "42"
V. Your Trial: The Gatekeeper
Create a script that asks for:
- Your name
- Your sigil
- Your cycle
If the sigil is "initiate"
and the cycle is greater than 18
, print:
“Welcome, [name]. The path begins.”
Otherwise, print:
“You are not yet ready.”
Example:
name = input("Name yourself: ")
sigil = input("Speak your sigil: ")
cycle = int(input("State your cycle: "))
if sigil == "initiate" and cycle > 18:
print(f"Welcome, {name}. The path begins.")
else:
print("You are not yet ready.")
VI. Reflection: Echo in the Shell
In this rite, you’ve learned:
- How to receive user input with
input()
- How to store and name values with variables
- How to compare and respond with
if
,elif
, andelse
- How to transform strings into numbers with
int()
andfloat()
You now control the flow of the spell. With every input and judgment, the Daemon becomes more reactive — more alive.