Python Lab 1 - Practice Exercises

Practice exercises

  1. Ask the user for two numbers and print their sum, subtraction, multiplication, and division
  2. Ask the user for a sentence and:
    • print it in upper case
    • print how many times the letter a appears (case-insensitive)
  3. Given a string, print its first half and second half using slicing(ask the user for the string)
  4. Check if the user input is only letters (no spaces) using isalpha()