Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Haaste: Leikkaaminen Index-funktion Avulla | Merkkijonot
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Tietotyypit Pythonissa

bookHaaste: Leikkaaminen Index-funktion Avulla

Tehtävä

Swipe to start coding

Try to extract words using slicing, but in a little bit more complicated way. The syntax of slicing is the following:

word[start_index:end_index]

To find the start_index, use the index() method, and to find the end_index, use the index() method, and add the length of the word.

  1. Extract the word painful.
  2. Extract the word mistakes.
  3. Extract the word learn.

If you use all the methods that were explored, this task won't be challenging for you.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 11
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you explain that in more detail?

What are the main benefits or drawbacks?

Can you give an example?

close

bookHaaste: Leikkaaminen Index-funktion Avulla

Pyyhkäise näyttääksesi valikon

Tehtävä

Swipe to start coding

Try to extract words using slicing, but in a little bit more complicated way. The syntax of slicing is the following:

word[start_index:end_index]

To find the start_index, use the index() method, and to find the end_index, use the index() method, and add the length of the word.

  1. Extract the word painful.
  2. Extract the word mistakes.
  3. Extract the word learn.

If you use all the methods that were explored, this task won't be challenging for you.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 11
single

single

some-alt