Lesson 1/6High school~150 min

Strings

Tasks with text and first complete programs: a digit sum, a cipher, palindromes, a birth number, BMI and a quadratic equation.

You can solve exercises without signing in; sign in and your progress is kept.

After this lesson you'll be able to:

  • Walk through a string with a loop and use slices
  • Use string methods: count, split, lower, isdigit
  • Handle bad input and split a program into functions
  • Print exactly what the task asks for - the tests compare the output line by line (trailing spaces do not matter). Write any prompt you like in input("…"); the tests ignore it.

What you practise here

+ 15

Strings · Graduation exam preparation | Mente