What if we just want to print the first sentence of the book, including the
period at the end? What method would you use to print just a piece of a string,
not the whole thing? And at what index does the first sentence end? Here's the
text from Alice in Wonderland that we gave you, or at least the first couple of
sentences. We could sit here and count to find exactly how many characters come
before the period. Or we could use the methods we already know. Implement to
get first sentence method. If it's working it should return this. If you're not
sure what methods to use to get started, you'll have the link to the fact
sheet.
¿Qué pasa si sólo queremos imprimir la primera oración del libro, incluyendo el
punto al final? ¿Qué método usarías para imprimir sólo un pedazo de una cadena,
no todo el asunto? Y ¿En qué índice termina la primera oración? Aquí está el
texto de Alicia en el País de las Maravillas que te dimos, o al menos las dos primeras
oraciones. Podríamos sentarnos aquí y contar hasta encontrar exactamente cuántos caracteres vienen
antes del período. O podríamos utilizar los métodos que ya conocemos. Implementa para obtener
el método getFirstSentence (obtenerPrimeraOracion) Si funciona, debería devolver esto. Si no estás
seguro de qué métodos utilizar para empezar, todavía tienes el enlace para la ficha
de información.
Et si nous voulons juste imprimer
la première phrase du livre,
y compris le point final?
Quelle méthode utiliseriez-vous pour
imprimer un morceau de chaîne,
pas le tout?
Et à quel index la première
phrase termine-t-elle?
Voici le texte d'Alice au pays
des merveilles
que nous vous avons donné,
ou au moins les premières phrases.
Nous pourrions nous mettre à
compter pour trouver exactement
combien de caractères
y a-t-il devant le point
ou nous pourrions utiliser les méthodes
que nous connaissons déjà.
Implémentez la méthode
getFirstSentence.
Si ça marche, elle devrait renvoyer ça.
Si vous n'êtes pas sûr des méthodes
à utiliser pour commencer,
vous avez le lien vers
la fiche d'information.
ピリオドで終わる最初の文章を出力したい時は?
文字列の一部だけを出力する場合に
使うメソッドは?
最初の文章が終わるインデックス番号は?
このテキストは「不思議の国のアリス」の
最初の数行です
ピリオドの前に正確に何文字あるか
数えてもいいですが
すでに知っているメソッドを使う方がいいですね
getFirstSentenceメソッドを実装して
それがうまく機能すれば答えを返します
最初に使うメソッドが分からなければ
ファクトシートへのリンクを見てください
책의 첫 번째 문장을 출력하고 싶다면 어떻게 해야 할까요?
전체 문자열 말고 문자열의 한 부분을 출력하고 싶다면 어떤 메소드를
사용해야 할까요? 그리고 어떤 인덱스에서 첫 번째 문장이 끝날까요?
이상한 나라에 온 Alice의 텍스트입니다.
한 문장이 몇 개의 문자를 갖고 있는지 숫자로 셀 수도 있고
우리가 이미 알고 있는 메소드를 이용해서 알 수 있습니다.
toGetFirstSentence 메소드를 구현하세요. 제대로 작동한다면 이걸 리턴해야
합니다. 어떠한 메소드를 사용해야 할지 모른다면, 참고 자료를
보세요.
Nếu ta chỉ muốn in ra câu đầu tiên của quyển sách, bao gồm
cả dấu chấm ở cuối thì sao? method nào bạn nên dùng để in ra 1 đoạn của chuỗi,
không phải là toàn bộ? Và ở vị trí nào thì câu đầu tiên kết thúc.
Đây là đoạn text của Alice in Wonderland mà tôi cho bạn, hay ít nhất thì là vài câu đầu tiên.
Ta có thể ngồi và đếm chính xác là bao nhiêu ký tự
ở phía trước dấu chấm. Hoặc ta có thể dùng methods mà ta đã biết. Hãy thêm
getFirstSentence method. Nếu nó hoạt động thì nó sẽ return this. Nếu bạn không chắc
dùng methods gì để bắt đầu, bạn vẫn có đường link
để tới fact sheet.