Posts What's Your Name (Python 3)
Post
Cancel

What's Your Name (Python 3)

  • URL : https://www.hackerrank.com/challenges/whats-your-name/problem

  • You are given the firstname and lastname of a person on two different lines. Your task is to read them and print the following:
    1
    
    `Hello firstname lastname! You just delved into python.`
    
  • Input Format
    • The first line contains the first name, and the second line contains the last name.
  • Constraints
    • The length of the first and last name ≤ 10.
  • Output Format
    • Print the output as mentioned above.

문제풀이

  • first_name과 last_name을 입력받아, print하는 문제
  • f.formatting을 사용하여 해결 끗
1
2
3
4
5
6
7
def print_full_name(a, b):
    print(f'Hello {a} {b}! You just delved into python.')

if __name__ == '__main__':
    first_name = input()
    last_name = input()
    print_full_name(first_name, last_name)
This post is licensed under CC BY 4.0 by the author.