+ 1

I struggle solving this...

Q: Write a program to output the following: "Everything you can imagine is real." - Picasso The format of the output should exactly match the above text. My input: cat(‚Äú\‚ÄĚEverything you can imagine is real.‚ÄĚ - Picasso‚ÄĚ\‚Äú) Output: error I‚Äôm not sure what I did wrong there. Could someone please also explain why it suggests me to use cat instead of print? Thank you in advance

27th Sep 2021, 3:23 PM
4 Respuestas
+ 3
The symbols you are using are not quote symbols. If you want include quote symbol ' " ' , or special symbols, just use escape symbol before it like \" in String. This works : cat("\"Everything you can imagine is real.\" - Picasso") edit: from search I got, print() adds line numbers but cat() don't adds..
27th Sep 2021, 4:27 PM
Jayakrishna ūüáģūüá≥
I think you probably want the second escaped double quote to appear after the word "real." By now, you have it after the word "Picasso"
27th Sep 2021, 4:12 PM
Try this : str1 = "\"Everything you can imagine is real.\"" str2 = "- Picasso" str3 = paste ( str1,str2) cat (str3)
10th Apr 2022, 9:33 PM
Anouar Dahdah
JayaKrishna thans sir you help me to solve this question
8th Sep 2022, 4:48 AM
Parash Kumar Yadav
Parash Kumar Yadav - avatar