+ 1

Am finding this difficult on kotlin lesson ๐Ÿ‘‰ (2.2 make it run)

pls how can solve this ๐Ÿ˜ญ๐Ÿ™๐Ÿ‘‰You are given code that outputs a quote. However, the code creates many unnecessary line breaks. ๏ปฟ ๏ปฟ Fix the code to generate the output on one line, without any line breaks. ๐Ÿ‘‰fun main(args : Array<String>) {๏ปฟ println("Code is like humor. \nWhen you have to explain it, \nitโ€™s bad.โ€ \nโ€“ Cory \nHouse")๏ปฟ }

3rd Feb 2022, 6:02 PM
Westling
Westling - avatar
10 Answers
+ 2
May be your's code has an extra space.. You're welcome..
3rd Feb 2022, 6:18 PM
Jayakrishna ๐Ÿ‡ฎ๐Ÿ‡ณ
+ 1
Okey it has work now thanks so much I really appreciate you brother God bless you so much ๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™
3rd Feb 2022, 6:13 PM
Westling
Westling - avatar
0
It just asking "Remove line breaks from output string.. " \n character adds line break in output...
3rd Feb 2022, 6:04 PM
Jayakrishna ๐Ÿ‡ฎ๐Ÿ‡ณ
0
I tried everything but is not working please help me solve it please ๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ™๐Ÿ˜ข๐Ÿ˜ญ๐Ÿ˜ญ
3rd Feb 2022, 6:05 PM
Westling
Westling - avatar
0
What is your try there?
3rd Feb 2022, 6:06 PM
Jayakrishna ๐Ÿ‡ฎ๐Ÿ‡ณ
0
fun main(args : Array<String>) { println("Code is like humor. When you have to explain it, itโ€™s bad.โ€ โ€“ Cory House") } I did it like this ๐Ÿ‘† and also tried other pattern too
3rd Feb 2022, 6:08 PM
Westling
Westling - avatar
0
fun main(args : Array<String>) {๏ปฟ println("Code is like humor. When you have to explain it, itโ€™s bad.โ€ โ€“ Cory House")๏ปฟ }
3rd Feb 2022, 6:09 PM
Jayakrishna ๐Ÿ‡ฎ๐Ÿ‡ณ
0
Okey thanks let me try it now thanks
3rd Feb 2022, 6:10 PM
Westling
Westling - avatar
0
I did same but its not working
3rd Feb 2022, 6:10 PM
Westling
Westling - avatar
0
Try this fun main(args: Array<String>) { println("Code is like humor. When you have to explain it, itโ€™s bad.โ€ โ€“ Cory House") }
4th Sep 2023, 10:04 AM
Okolocha Deborah
Okolocha Deborah - avatar