ชื่อเล่น

📋 โจทย์

รับชื่อและนามสกุล (บรรทัดละ 1 คำ) บรรทัดที่ 1 แสดง "Hello <ชื่อ> <นามสกุล>" บรรทัดที่ 2 แสดงชื่อเล่นจาก 2 ตัวอักษรแรกของชื่อ + 2 ตัวอักษรแรกของนามสกุล

⚠️ ข้อจำกัด

2 ≤ ความยาวชื่อ, นามสกุล ≤ 50

📝 ตัวอย่าง

ตัวอย่างที่ 1
Input:
Katy
Perry
Output:
Hello Katy Perry
KaPe
ตัวอย่างที่ 2
Input:
Alex
Goot
Output:
Hello Alex Goot
AlGo
ตัวอย่างที่ 3
Input:
John
Smith
Output:
Hello John Smith
JoSm
🔓 ดูเฉลย
first = input()
last = input()
print(f"Hello {first} {last}")
print(first[:2] + last[:2])

💡 ใช้ slicing [:2] เพื่อตัดเอา 2 ตัวอักษรแรก แล้วใช้ + ต่อ string

🐍 main.py

กด Run เพื่อรันโค้ด หรือ ตรวจคำตอบ เพื่อตรวจ test cases