Skip to content
C

Problem 4: Greeting Function with Default Argument

Easypython

Problem Description

Write a function greet_user(name, language="English") that prints a greeting message in the specified language. If no language is given, it should default to English. Support at least English and Hindi greetings.

Input

A name, and optionally a language.

Output

A greeting message in the requested language.

Constraints

  • Language will be either "English" or "Hindi" if provided.

Example Input

text
name = "Aarav", language = "Hindi"

Example Output

text
Namaste, Aarav!

Concepts Covered

Functions, default parameters, conditionals, string formatting.

Input (stdin)

Output

Run your code to see output here...