Learn Swift
A free, interactive online Swift course. You write Swift on every lesson - syntax, optionals, structs, classes, protocols, closures - with AI hints when an optional surprises you, and a free certificate when you finish.
1,828+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction
3 lessons216- 01The LanguageChallenge
- 02Hello World!ChallengeQuizAudio
- 03CommentsQuizAudio
Variables
7 lessons751- 01Let vs VarChallengeQuizAudio
- 02Type AnnotationsChallengeQuizAudio
- 03NumbersChallengeQuizAudio
- 04StringChallengeQuizAudio
- 05BooleanChallengeQuizAudio
- 06Naming ConventionsChallengeQuizAudio
- 07Recap - Initialize VariablesChallenge
Optionals
5 lessons532- 01What Are OptionalsChallengeQuizAudio
- 02Unwrapping With If LetChallengeQuizAudio
- 03Guard LetChallengeQuizAudio
- 04Nil Coalescing OperatorChallengeQuizAudio
- 05Recap - Safe UnwrappingChallenge
Operators Part 1
5 lessons534- 01Arithmetic OperatorsChallengeQuizAudio
- 02Modulo OperatorChallengeQuizAudio
- 03Compound AssignmentChallengeQuizAudio
- 04Recap - Simple MathChallenge
- 05Comparison OperatorsChallengeQuizAudio
Operators Part 2
5 lessons532- 01Logical Operators Part 1ChallengeQuizAudio
- 02Logical Operators Part 2ChallengeQuizAudio
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuizAudio
- 05Ternary OperatorChallengeQuizAudio
Decision Making
5 lessons534- 01If StatementChallengeQuizAudio
- 02If - ElseChallengeQuizAudio
- 03Recap - Simple CalculatorChallenge
- 04Switch StatementChallengeQuizAudio
- 05Switch With RangesChallengeQuizAudio
Basic IO
6 lessons634- 01Print FunctionChallengeQuizAudio
- 02String InterpolationChallengeQuizAudio
- 03ReadLine InputChallengeQuizAudio
- 04Type ConversionChallengeQuizAudio
- 05Recap - Till 120Challenge
- 06Recap - True or FalseChallenge
Bill Split Calculator
Project5 lessons1- 01Welcome MessageChallenge
- 02Getting InputProject
- 03Calculating Tip And TotalProject
- 04Splitting The BillProject
- 05Formatted OutputProject
Loops
9 lessons967- 01For-In LoopChallengeQuizAudio
- 02While LoopChallengeQuizAudio
- 03Repeat-While LoopChallengeQuizAudio
- 04BreakChallengeQuizAudio
- 05ContinueChallengeQuizAudio
- 06Recap - FactorialChallengeQuiz
- 07Ranges In LoopsChallengeQuizAudio
- 08Nested LoopChallengeQuizAudio
- 09Recap - Dynamic InputChallenge
Functions
7 lessons742- 01Declare A FunctionChallengeQuizAudio
- 02Parameters And ArgumentsChallengeQuizAudio
- 03Return ValuesChallengeQuizAudio
- 04Argument LabelsChallengeQuizAudio
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
- 07Default ValuesChallengeQuizAudio
FizzBuzz with a Twist
Project4 lessons1- 01Game OverviewChallenge
- 02The FizzBuzz FunctionProject
- 03Looping The NumbersProject
- 04Adding The TwistProject
Arrays Basics
7 lessons745- 01Declaring An ArrayChallengeQuizAudio
- 02Accessing ElementsChallengeQuizAudio
- 03Modifying ArraysChallengeQuizAudio
- 04Array MethodsChallengeQuizAudio
- 05Recap - Product ListChallenge
- 06Recap - Reversed ArrayChallenge
- 07TuplesChallengeQuizAudio
Iterating Over Sequences
4 lessons434- 01Iterating Over ElementsChallengeQuizAudio
- 02The Enumerated MethodChallengeQuizAudio
- 03Iterating Over Strings P1ChallengeQuizAudio
- 04Iterating Over Strings P2ChallengeQuizAudio
Arrays Advanced
4 lessons436- 01Array Slicing Part 1ChallengeQuizAudio
- 02Array Slicing Part 2ChallengeQuizAudio
- 03Sequence OperatorsChallengeQuizAudio
- 04The Contains MethodChallengeQuizAudio
Daily Expense Tracker
Project7 lessons1- 01Project OverviewChallenge
- 02Exit The ProgramProject
- 03Add ExpenseProject
- 04View All ExpensesProject
- 05Total And AverageProject
- 06Clear AllProject
- 07Handling ErrorsProject
Final Challenges
3 lessons3- 01Flat Asterisk PyramidChallenge
- 02Pattern FinderChallenge
- 03What To BuyChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseSharpen your Swift with strings, ranges, dictionaries, sets, higher-order functions, closures, and error handling. Two guided projects tie everything together.Strings In Depth
6 lessons643- 01Count and IndicesChallengeQuiz
- 02Case and TrimChallengeQuiz
- 03Searching in StringsChallengeQuiz
- 04Splitting and JoiningChallengeQuiz
- 05Replacing SubstringsChallengeQuiz
- 06Recap - Username CheckChallenge
Ranges & Strides
5 lessons533- 01Closed vs Half-OpenChallengeQuiz
- 02StrideChallengeQuiz
- 03Range MethodsChallengeQuiz
- 04Ranges in SwitchChallengeQuiz
- 05Recap - Calendar GridChallenge
Dictionaries
6 lessons641- 01Declaring DictionariesChallengeQuiz
- 02Optional LookupChallengeQuiz
- 03Updating DictionariesChallengeQuiz
- 04Iterating DictionariesChallengeQuiz
- 05Grouping ValuesChallengeQuiz
- 06Recap - InventoryChallenge
Sets
5 lessons535- 01Creating SetsChallengeQuiz
- 02Union and IntersectionChallengeQuiz
- 03Subtracting and SymmetricChallengeQuiz
- 04Subset and SupersetChallengeQuiz
- 05Recap - Tag FilterChallenge
Higher-Order Functions Pt1
5 lessons533- 01MapChallengeQuiz
- 02FilterChallengeQuiz
- 03ReduceChallengeQuiz
- 04Chaining map, filter, reduceChallengeQuiz
- 05Recap - Word StatsChallenge
Higher-Order Functions Pt2
5 lessons532- 01compactMapChallengeQuiz
- 02flatMapChallengeQuiz
- 03sorted(by:)ChallengeQuiz
- 04Building PipelinesChallengeQuiz
- 05Recap - LeaderboardChallenge
Project - Habit Tracker
Project5 lessons142- 01Project OverviewChallengeQuiz
- 02Mark DoneProjectQuiz
- 03Longest StreakProjectQuiz
- 04Weekly GridProjectQuiz
- 05Compare WeeksProjectQuiz
Closures
6 lessons641- 01Closure BasicsChallengeQuiz
- 02Trailing ClosuresChallengeQuiz
- 03Capturing ValuesChallengeQuiz
- 04Returning ClosuresChallengeQuiz
- 05Custom Higher-OrderChallengeQuiz
- 06Recap - Pipeline BuilderChallenge
Error Handling
5 lessons533- 01throws and ErrorChallengeQuiz
- 02do, try, catchChallengeQuiz
- 03try? and try!ChallengeQuiz
- 04Propagating ErrorsChallengeQuiz
- 05Recap - Safe CalculatorChallenge
Project - Quiz Engine
Project5 lessons141- 01Project OverviewChallengeQuiz
- 02Ask QuestionsProjectQuiz
- 03Lenient GradingProjectQuiz
- 04Filter by CategoryProjectQuiz
- 05Summary ReportProjectQuiz
Final Challenges
3 lessons3- 01Anagram GroupsChallenge
- 02Log AggregatorChallenge
- 03Calculator With HistoryChallenge
Swift courses
Hands-on Swift courses, free to start in your browser.
Beginner Challenges - Practice Basic Concepts
PopularPut your beginner coding knowledge to test and try to solve this programming challenges, use any language you want, Happy Coding!
Certificate on completion
- 20
- 20
Coding Problems
PopularPut your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language.
Certificate on completion
- 32
- 31
Coding Problems: Volume 2
Put your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language. This course is an extension of the first Coding Problems
Certificate on completion
- 25
- 24
Stack - Data Structures Series #1
In this course, you will learn about the Stack data structure, create a Stack from zero using your preferred language, and practice coding challenges with it!
- 13
- 6
- 1
Recursion Challenges - Master The Recursive Thinking
Recursion is an important concept in computer science and a very powerful tool in writing algorithms. In this course, you will use recursion to solve challenges from beginner to advanced. In the end, you will ace this topic.
Certificate on completion
- 15
- 15
Star Pattern Bootcamp
Put your programming problem solving skills to learn how to print star patterns range from simple to complex, involving different levels of nested loops, conditional statements, and mathematical calculations.
- 30
- 28
Why learn Swift with Coddy
- Write and run real Swift code in your browser. No Xcode install, no Mac required. Each lesson compiles your Swift program server-side and shows the output instantly, so you can learn Swift on Windows, Linux, or any machine.
- Modern Swift: variables and types, control flow, optionals, structs vs classes, protocols, generics, closures, error handling. The Swift foundations every iOS developer needs.
- AI hints help you read and fix Swift compiler errors and unwrap optionals correctly, so concepts like nil-safety and value vs reference types click instead of confusing you.
- Free Swift certificate when you finish the course. A credible signal for iOS, macOS, watchOS, and visionOS developer roles where Swift is the primary language.