LearnPy Hub
← Pandas: DataFrames problems
Medium

String Columns

Add a column code = first 3 letters of the name in upper case + '-' + dept. Print the codes on one line.

Input

Lines 'name dept cgpa credits', then END.

Output

One line.

Sample 1

Input
Mim CSE 3.82 120
Rafi EEE 3.41 98
Sara CSE 3.95 132
Tuhin BBA 3.60 110
Nadia CSE 3.71 125
END
Output
MIM-CSE RAF-EEE SAR-CSE TUH-BBA NAD-CSE

Sample 2

Input
A CSE 3.00 100
END
Output
A-CSE
solution.py
Output appears here
String Columns · Python practice problem · LearnPy Hub