+ 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
4 Respostas
+ 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..
0
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"
0
Try this :
str1 = "\"Everything you can imagine is real.\""
str2 = "- Picasso"
str3 = paste ( str1,str2)
cat (str3)
0
JayaKrishna thans sir you help me to solve this question