Beginner Codes/Python/Madlibs Game
5%

Instructions

Madlibs Game 📖

Python-la variables and input() rendu vishayathaiyum serthu oru chinnadha fun game panna porom! Adhu dhaan Madlibs Game.

🔍 Deep Dive: Real-world Analogy (Fill-in-the-blanks Story ✏️)

Chinna vayasula fill in the blanks ezhudhi irupom la? Adhe dhaan! Naama oru story ezhudhi, adhula sila words-a (name, place, action) mattum gaali aaki veppom. User kitta irundhu andha words-a vaangi story-la fit panni padicha romba fun-a irukkum!

String Concatenation (+)

Story-aiyum user kudutha variable-aiyum serthu print panna, + operator use pannuvom. Idhukku peru String Concatenation (Rendu string-a otta vekkaradhu).

name = input("Enter your name: ")
place = input("Enter a place: ")

print(name + " went to the " + place)
# Output: Aravind went to the beach

Idha theliva purinjikka indha interactive visualizer-a test pannunga:

Output will appear here...
What is happening?
Keela oru animal-um oru action-um type pannunga, apparam 'Run Code' click pannunga.

💡 Did You Know? String concatenation pannumbodhu spaces-a marandhuduvanga! "went to the" + place nu pottal space varadhu. Spaces-aiyum quotes-kulla dhaan vekkanum "went to the " madhiri!

Your Turn! (Unga neram!)

Let's build a mini story!

  1. animal = input("Name an animal: ") nu ezhudhunga.
  2. action = input("Name an action: ") nu ezhudhunga.
  3. Rendu lines-kum aprom, print("The " + animal + " likes to " + action) nu serthu print pannunga.

Help

Madlibs GameExercise 5/7730 XP
❴❵ script.py
python.code
python
Loading...
Terminal
Terminal — python
Beginner Codes Terminal v1.0.0
─────────────────────────────────────
Ready. Click "Run Code" to execute...
Ready
Piston APIPYTHON0 lines