Logic101

Problem Sets

NAMASTE

Beginner PSET 0 — Problem 1
A greeting is one of the oldest technologies humans ever invented.

Long before smartphones, social media, or even modern nations existed, humans used greetings to signal peace, trust, and respect.

The word Namaste comes from Sanskrit:

namas + te

roughly meaning:

I bow to you

This single word carries over 5,000 years of continuous use. Archaeologists have found gestures resembling Namaste in Harappan seals dating back to 2000 BCE. The gesture appears in temple sculptures across India, Buddhist traditions spanning from Sri Lanka to Japan, and ancient meditation practices that predate almost every major religion.

What makes Namaste remarkable is not just its age, but its adaptability. Through centuries of empires rising and falling — the Mauryas, the Guptas, the Mughals, the British — this one gesture persisted. It survived Sanskrit evolving into Hindi, Bengali, Tamil, and dozens of other languages. It survived the introduction of Islam, Christianity, and every other faith that reached the subcontinent.

In 2020, when the COVID-19 pandemic forced the world to reconsider the handshake — a practice that originated as a way to show you weren't carrying a weapon — Namaste became a global phenomenon. World leaders from France's Emmanuel Macron to Israel's Benjamin Netanyahu were photographed using it. The WHO indirectly promoted it as a "contactless greeting." Newspapers from The New York Times to The Guardian ran stories about this ancient Indian practice.

A gesture that survived 5,000 years of human history became, in a moment of crisis, the world's most practical piece of cultural technology.

And the very first thing most programmers learn to build? A program that greets someone. The tradition continues — just in a new medium.

Your phone says "Hello" when you unlock it. Chat applications greet you when you open them. Voice assistants introduce themselves. Even websites say "Welcome back." The greeting is, and has always been, humanity's first protocol — the first message any system sends when a connection is established.

Specification

In a file called namaste.py, implement a program that prompts the user for their name and then greets them.

For example, if the user's name is Aarav, your program should output:

Namaste, Aarav

Demo

What is your name? Aarav
Namaste, Aarav
What is your name? Tanishka
Namaste, Tanishka

Hints

Getting Input

Use input() to ask the user a question. The string inside the parentheses becomes the prompt. Whatever the user types is returned as a string — you can store it in a variable.

Storing Values

Assign the result of input() to a variable. Think of name = input("What is your name? ") as putting a nametag on whatever the user typed.

Printing Output

Use an f-string to combine text with a variable: print(f"Namaste, {name}"). The f before the string tells Python to substitute any expression inside {}.

Start Coding

Open your Codespace and create namaste.py.

Open Codespace
l101 test namaste.py