Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.38 KB

File metadata and controls

33 lines (27 loc) · 1.38 KB

CA01 - Basics Data Types and Printing

Course: Web Application Development Using Python (ICTC5)
Instructor: George Khoury
Revision: 1
Last updated: 5-07-2020
Submission Date: No submission required.

Problems

  1. Write a program which calculates the area of a circle given the radius.
  2. Write a program which prints to the screen the extension of any given file name.
    1. Sample input: "Airplane.java"
    2. Sample output: "java"
  3. Write a program which prints two versions of a String. One in all uppercase characters, and the second all in lowercase.
  4. Write a program which counts the number of occurrences of a given character in a string.
  5. Write a program which parses a string value to an int.
    1. Sample input: "23456"
    2. Sample output: 23456
  6. Write a program which converts all units of time into seconds.
    1. Sample input: "3 days, 14 hours, 27 minutes, 33 seconds.
    2. Sample output: 311253 seconds
  7. Write a program which prints the output of a variable name.
    1. Sample input: name = "Python"
    2. Sample output: "Hello there, Python!"
  8. Given a string input Count all lower case, upper case, digits, and special symbols.
    1. Sample input: password = P@$$w0rd
    2. Sample output: Your password contains 4 chars. 1 digits. 3 symbols.

Solutions

You can find suggested solutions to the problems above here.