programming_languages

🚀 02 — Hello User

← Volver a 01_Hello_World
↑ Volver a inicio / Back to home


🎯 Objetivo / Objective

Español English
Declarar y usar variables para interactuar con el usuario: solicitar entrada por consola, almacenarla en una variable y mostrar un mensaje personalizado utilizando las funciones/métodos de la biblioteca estándar del lenguaje. Declare and use variables to interact with the user: ask for console input, store it in a variable, and display a personalized message using the language’s standard library functions/methods.

📝 Especificación / Specification

📋 Enunciado / Problem Statement

Español English
Crear un proyecto de nombre hello_user cuyo contenido sea un solo archivo (hello_user.ext / HelloUser.ext) que solicite al usuario su nombre, lo almacene en una variable name, y luego muestre “Hello, {name}!” en la consola. Create a project named hello_user with a single file (hello_user.ext or HelloUser.ext) that asks the user for their name, stores it in a variable name, and then displays “Hello, {name}!” in the console.

Entrada / Input

Una línea de texto ingresada por el usuario (nombre del usuario). A single line of text entered by the user (user’s name).

Salida esperada / Expected Output

What is your name? John
Hello, John!

ES: Reemplaza “John” por cualquier nombre que ingrese el usuario.
EN: Replace “John” with whatever name the user enters.

✅ Criterios de aceptación / Acceptance Criteria


💡 Ejemplo / Example

Pseudocódigo / Pseudocode

ask "What is your name?" 
store user's answer/input in variable 'name'
show "Hello, " + name + "!"

Python

# hello_user.py
name = input("What is your name? ")
print("Hello, " + name + "!")

Java

// HelloUser.java
import java.util.Scanner;

public class HelloUser {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("What is your name? ");
        String name = scanner.nextLine();
        System.out.println("Hello, " + name + "!");
    }
}

📂 Ubicación esperada / Expected Location

programming_languages/
└── {language}/
    └── core/
        └── foundations/
            └── hello_user/
                ├── hello_user.ext    # Código fuente / Source code (.ext = extensión del lenguaje / language extension)
                └── README.md         # Instrucciones específicas (opcional)

▶️ Siguiente / Next

👉 Sigue con 03_Unit_Test_Calculator.md — Pruebas unitarias con operaciones aritméticas básicas.
👉 Continue with 03_Unit_Test_Calculator.md — Unit testing with basic arithmetic operations.


*← Volver a 01_Hello_World ↑ Inicio*