Register now or log in to join your professional community.
Given a positive integer num, write a function that returns True if num is a perfect square else False.
Python
string = "Once in a blue moon";
ch = '-';
#Replace space with specific character ch.
string = string.replace(' ', ch);
print("String after replacing spaces with given character: ");
print(string);