Swift Coding Challenges

This repository consists of Swift code that contains solutions to various programming problems. The problems range from basic algorithm questions to more complex computations. Each class provides a solution to a specific problem.

Contents

  • Kilometer to Mile Conversion: A method to convert kilometers to miles.
  • Rectangle Area Calculation: A method to calculate the area of a rectangle based on side lengths.
  • Factorial Calculation: A method to calculate the factorial value of a number.
  • Letter Counting: A method to count the number of times a certain letter appears in a word.
  • Calculating Interior Angles: A method to calculate the interior angles of a polygon.
  • Salary Calculation: A method that calculates salary according to the number of days worked.
  • Parking Fee Calculation: A method that calculates the fee according to the time spent in the parking lot.
  • Mean Calculation: A method to calculate the average of an array of numbers.
  • Array Modification: A method to modify each element of an array.
  • Odd and Even Numbers: Methods to separate odd and even numbers from an array.
  • Random Number Array: A method to create and sort an array of random numbers.
  • School Report: A method to display grades for different subjects and calculate the average.
  • Name Check: A method to check if a specific name is in an array.
  • Various Dictionary Operations: Methods to manipulate dictionaries including adding, updating, removing entries, and filtering.

Installation

You need Xcode and the Swift language to run this code. Use the following Git command to clone the project to your local machine:

git clone https://github.com/Melikesc/SwiftCodingChallenges.git

Usage

Each class can be run independently and will give the relevant output on the console. For example, While Q1 class converts kilometers to miles, Class Q7 will calculate the parking fee.

License

This project is licensed under the MIT license. See the LICENSE file for more information.