12710 - Python2020_MOOCS_Practice_Problem2   

Description

Write a Python program that takes two names from the inputs and prints two sentenses "XXX and OOO are my friends." and "OOO is my best friend" to the output, where "XXX" and "OOO" are the names from the inputs.

Assume the program is written in a file named "friends.py" and run from the command line. The following block shows how the terminal shall look like: (the text in pink is typed by the user; others are printed by the program)

$ python3 friends.py
Mary Cindy
Mary and Cindy are my friends.

Cindy is my best friend.

$

 

[Hint]
There is a space between "Mary" and "Cindy". Actually you might get "Mary Cindy" by calling input() just once. You should then use another method to separate the two names.
Watch out for spaces and new line characters -- any difference makes your code not accepted by Online Judge.
In this problem, one extra empty line is required after the both output sentence, "Mary and Cindy are my friends." and "Cindy is my best friend.".

Input

One sentence includes two names and one space between the names.

Output

Two sentences claiming your friends and your best friend with one extra empty line after each of the sentences.

Sample Input  Download

Sample Output  Download




Discuss