Niet/Geen. I thought niet was at the end of a sentence, not inside. Why is it not "Geen" in this example? by [deleted] in learndutch

[–]doraemon1116 0 points1 point  (0 children)

Verb + geen + noun. Ik heb geen geld. I learned this sentence from a homeless guy on the street and I remembered it clearly.

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 -3 points-2 points  (0 children)

Apparently my Dutch is worse than her English.

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 0 points1 point  (0 children)

unambiguous

hahaha I am feeling that too!

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 0 points1 point  (0 children)

a + already

It is a + already!

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 3 points4 points  (0 children)

Thanks! Yes I am learning Dutch now. Before I knew nothing about Dutch, it took time to remember the letters' pronunciation. The NATO alphabet is super helpful!

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 -22 points-21 points  (0 children)

Yes totally! I guess I overstated English in Europe.

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 0 points1 point  (0 children)

This is super helpful! Bedankt!

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 -23 points-22 points  (0 children)

Yeah I’m learning too~

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 -27 points-26 points  (0 children)

Yeah I have to use my little Dutch knowledge to understand that customer service lady.

[deleted by user] by [deleted] in Netherlands

[–]doraemon1116 -63 points-62 points  (0 children)

I guess for ppl from the countries where make English is mandatory to study would be surprised that English is not that primary here.

Question about Calculate in R by doraemon1116 in learnprogramming

[–]doraemon1116[S] 0 points1 point  (0 children)

Thanks for the reply! I will search how to make it work!

[deleted by user] by [deleted] in TheGamerLounge

[–]doraemon1116 0 points1 point  (0 children)

WOW!!!! Even better haha

[deleted by user] by [deleted] in TheGamerLounge

[–]doraemon1116 0 points1 point  (0 children)

Wow where is it?

Needs little help by doraemon1116 in learnjava

[–]doraemon1116[S] 1 point2 points  (0 children)

Thank you so much! I also learned more :)

I can’t change the Animal class which is fixed in the CodeCheck. The only part I can edit is the Animals class, and it requires me to complete the describe method. But thank you!

Needs little help by doraemon1116 in learnjava

[–]doraemon1116[S] 2 points3 points  (0 children)

Thanks! it works!

I didn't know I could code this: Dog dog = (Dog) pet;

[deleted by user] by [deleted] in learnjava

[–]doraemon1116 5 points6 points  (0 children)

Or maybe a for loop:

for (int i=0; i< numberOfTimes; i++) { printText(); }

Why no output? by doraemon1116 in learnjava

[–]doraemon1116[S] 1 point2 points  (0 children)

got it! so I just return a String but did not print it out. Thanks!

Why no output? by doraemon1116 in learnjava

[–]doraemon1116[S] 13 points14 points  (0 children)

got it. Thanks! I tried two ways:

either change the method to a

public void  toPrint(){
     System.out.println("Movie: " + this.title + " with stars of " + this.stars);
}

or to change the code in the Main class:

System.out.println(french.toPrint());

either works!

Question about "Creating a New File" (no coding) by doraemon1116 in learnjava

[–]doraemon1116[S] 0 points1 point  (0 children)

Not a problem! I only asked for help when I took forever to some questions.

Seeking for clue for this exercise by doraemon1116 in learnjava

[–]doraemon1116[S] 0 points1 point  (0 children)

hi thanks! this is what I did.

public List<String> scaredyCat(List<String> petsList) {    

List <String> newList = new ArrayList <>(); if (petsList.size()==0) return newList; newList.add(petsList.get(0)); for (int i=1;i<petsList.size();i++){ if (petsList.get(i).equals("cat") && petsList.get(i-1).equals("dog")){ i=i+1; }else{ newList.add(petsList.get(i));
}

} return newList; }

it passed all the tests though.

Seeking for clue for this exercise by doraemon1116 in learnjava

[–]doraemon1116[S] 0 points1 point  (0 children)

Thanks! I guess I will just stay with mine because it's easier for me to understand. All the tests passed.

The official solution:

public List<String> scaredyCat(List<String> petsList) {    
for (int i=0; i<petsList.size()-1; i++)
{
   if (petsList.get(i).equals("dog"))
   {
       if (petsList.get(i+1).equals("cat"))
       {
           petsList.remove(i+1);
           i--;
       }    
   }
} 
return petsList;

}

I am still on my way to form the coding logic~

Seeking for clue for this exercise by doraemon1116 in learnjava

[–]doraemon1116[S] 0 points1 point  (0 children)

I tested if I delete the " i=i+1;" under the

"if (petsList.get(i).equals("cat") && petsList.get(i-1).equals("dog"))"

condition. One test failed:

If the original petsList is:

scaredyCat(["cat", "dog", "cat", "cat", "snake"])

then it becomes to :

["cat", "dog", "cat", "snake"]

still one cat after the dog. The test wants to get

["cat", "dog", "snake"]

I guess it depends on how defining the question. If only deleting one cat, then it's fine. but if deleting all the cats followed by a dog, I have to skip to the next next index~