UwU is used as an emoticon to demonstrate a reaction to something cute. In this emoticon, the ‘U’s signify 2 closed eyes and the ‘w’ signifies the clenched, excited mouth lips. Imagine seeing something cute, like a baby cutely sneezing, the response can be UwU which is pronounced as “ooh-wooh”.
UwU text is the type of lingo in which the original text has been “UwUfied”. UwU text is supposed to be a cuter version of the original text. It is popular with certain online communities, mostly as a fun practice.
Examples:
Input : The quick brown fox jumps over the lazy dog.
Output : The quick bwown fox jumps ovew the wazy dog.
Input : Nooo! I was not late to work!
Output : Nyooo! I was nyot wate to wowk!
Algorithm :
- Change all the ‘R’s and ‘r’s to ‘w’ and ‘W’ respectively.
- Change all the ‘L’s and ‘l’s to ‘w’ and ‘W’ respectively.
- If the current character is ‘o’ or ‘O’ and the previous character is either ‘M’, ‘m’, ‘N’ or ‘n’, then add ‘y’ between the characters.
- If none of the condition matches for any character then leave that character as it is.
Python3
def generateUwU(input_text):
length = len (input_text)
output_text = ''
for i in range (length):
current_char = input_text[i]
previous_char = ' 092; 048;'
if i > 0 :
previous_char = input_text[i - 1 ]
if current_char = = 'L' or current_char = = 'R' :
output_text + = 'W'
elif current_char = = 'l' or current_char = = 'r' :
output_text + = 'w'
elif current_char = = 'O' or current_char = = 'o' :
if previous_char = = 'N' or previous_char = = 'n' or previous_char = = 'M' or previous_char = = 'm' :
output_text + = "yo"
else :
output_text + = current_char
else :
output_text + = current_char
return output_text
if __name__ = = '__main__' :
input_text1 = "The quick brown fox jumps over the lazy dog."
input_text2 = "Nooo ! I was not late to work !"
print (generateUwU(input_text1))
print (generateUwU(input_text2))
|
Output :
The quick bwown fox jumps ovew the wazy dog.
Nyooo! I was nyot wate to wowk!