16. Exercise List

Use the interactive interpreter below to solve the following exercises.

  1. Your current salary is $6500. Calculate your new salary with a 5% increase.

  2. Display your name on the screen.

  3. Calculate the sum of three variables.

  4. What happens if you write text in the previous three variables?

  5. Indicate the type of the following values: 5, 5.0, 4.3, -2, 100, 1.333, "10"

  6. Experiment in the interactive Python interpreter using type(x) where x is each of the previous values.

  7. Is it possible to calculate 2 to the power of one million?

  8. Try assigning a variable greeting the string 'hello'.

  9. Ask the user to enter their name and store it in another variable name.

  10. Is it possible to join both strings of characters (strings) greeting and name?

  11. Try to get the length of the character strings with len(x)


“Life is like riding a bicycle. To keep your balance, you must keep moving”. - Einstein

    On a scale from 1 (needs improvement) to 3 (excellent), how would you rate this chapter?
  • 1
  • 2
  • 3
You have attempted of activities on this page