0
Help with social network code coach
What is my bug why don't I get each post seperatly https://sololearn.com/compiler-playground/c77IdMKGEzWc/?ref=app https://sololearn.com/compiler-playground/c77IdMKGEzWc/?ref=app
7 ответов
+ 1
Hello bro. I don't get it, it runs perfectly. what did you expect?
You only instantiated only one time in class, so will print only one time. If you want to get them separated by a new line use the /n at the end of each string to separate each post I think. Or remove the comments before each string.
+ 1
Gabriel Sousa the output you see in the console log is because I commented everything but Hello!. So computer would ignore all others but "Hello!"
+ 1
So you don't need to instantiate four times, you will take the user input pass as an argument while instating the class and then output the user input
0
Gabriel Sousa Gabriel Sousa the Result tab says:
Test #1
User Input:
Hello!
Your Output:
New post
Hello!
New post
What a good day!
New post
Graduated!
New post
Vibes
New post
I will be back
Expected Output:
New post
Hello!
Test # 2:
User Input:
What a good day!
Your Output:
New post
Hello!
New post
What a good day!
New post
Graduated!
New post
Vibes
New post
I will be back
Expected Output:
New post
What a good day!
Test # 3:
User Input:
Graduated!
Your Output:
New post
Hello!
New post
What a good day!
New post
Graduated!
New post
Vibes
New post
I will be back
Expected Output:
New post
Graduated!
Test # 4:
User Input:
Vibes
Your Output:
New post
Hello!
New post
What a good day!
New post
Graduated!
New post
Vibes
New post
I will be back
Expected Output:
New post
Vibes
Test # 2:
User Input:
I will be back
Your Output:
New post
Hello!
New post
What a good day!
New post
Graduated!
New post
Vibes
New post
I will be back
Expected Output:
New post
I will be back
0
Gabriel Sousa how do I do 4 instantiates in a class?
0
Gabriel Sousa \n
Didn't help
0
Gabriel Sousa how do I do that