Exercises

Create a new file called basics.py. Write code in it to do the following:

  1. Print your favourite video game on the console.

  2. Print your favourite animal as well.

  3. Use the print function once to output the two previous strings separated by a newline.

  4. Print the following expressions in Python

    1. 61 + 4

    2. 25 - 12.5

    3. 25÷225 \div 2

    4. 5×55 \times 5

    5. 6×2+56 \times 2 + 5

    6. 6×(2+5)6 \times (2 + 5)

    7. 10÷(4×(5÷2))10 \div (4 \times (5 \div 2))

Last updated