Learn Swift
A free, interactive online Swift course. You write Swift on every lesson, with AI hints when an optional surprises you, and a free certificate when you finish.
2,055+ 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 lessons316- 01The LanguageChallenge
- 02Hello World!ChallengeQuiz
- 03CommentsChallengeQuiz
Variables
7 lessons751- 01Let vs VarChallengeQuiz
- 02Type AnnotationsChallengeQuiz
- 03NumbersChallengeQuiz
- 04StringChallengeQuiz
- 05BooleanChallengeQuiz
- 06Naming ConventionsChallengeQuiz
- 07Recap - Initialize VariablesChallenge
Optionals
5 lessons532- 01What Are OptionalsChallengeQuiz
- 02Unwrapping With If LetChallengeQuiz
- 03Guard LetChallengeQuiz
- 04Nil Coalescing OperatorChallengeQuiz
- 05Recap - Safe UnwrappingChallenge
Operators Part 1
5 lessons534- 01Arithmetic OperatorsChallengeQuiz
- 02Modulo OperatorChallengeQuiz
- 03Compound AssignmentChallengeQuiz
- 04Recap - Simple MathChallenge
- 05Comparison OperatorsChallengeQuiz
Operators Part 2
5 lessons532- 01Logical Operators Part 1ChallengeQuiz
- 02Logical Operators Part 2ChallengeQuiz
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuiz
- 05Ternary OperatorChallengeQuiz
Decision Making
5 lessons534- 01If StatementChallengeQuiz
- 02If - ElseChallengeQuiz
- 03Recap - Simple CalculatorChallenge
- 04Switch StatementChallengeQuiz
- 05Switch With RangesChallengeQuiz
Basic IO
6 lessons634- 01Print FunctionChallengeQuiz
- 02String InterpolationChallengeQuiz
- 03ReadLine InputChallengeQuiz
- 04Type ConversionChallengeQuiz
- 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 LoopChallengeQuiz
- 02While LoopChallengeQuiz
- 03Repeat-While LoopChallengeQuiz
- 04BreakChallengeQuiz
- 05ContinueChallengeQuiz
- 06Recap - FactorialChallengeQuiz
- 07Ranges In LoopsChallengeQuiz
- 08Nested LoopChallengeQuiz
- 09Recap - Dynamic InputChallenge
Functions
7 lessons742- 01Declare A FunctionChallengeQuiz
- 02Parameters And ArgumentsChallengeQuiz
- 03Return ValuesChallengeQuiz
- 04Argument LabelsChallengeQuiz
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
- 07Default ValuesChallengeQuiz
FizzBuzz with a Twist
Project4 lessons1- 01Game OverviewChallenge
- 02The FizzBuzz FunctionProject
- 03Looping The NumbersProject
- 04Adding The TwistProject
Arrays Basics
7 lessons745- 01Declaring An ArrayChallengeQuiz
- 02Accessing ElementsChallengeQuiz
- 03Modifying ArraysChallengeQuiz
- 04Array MethodsChallengeQuiz
- 05Recap - Product ListChallenge
- 06Recap - Reversed ArrayChallenge
- 07TuplesChallengeQuiz
Iterating Over Sequences
4 lessons434- 01Iterating Over ElementsChallengeQuiz
- 02The Enumerated MethodChallengeQuiz
- 03Iterating Over Strings P1ChallengeQuiz
- 04Iterating Over Strings P2ChallengeQuiz
Arrays Advanced
4 lessons436- 01Array Slicing Part 1ChallengeQuiz
- 02Array Slicing Part 2ChallengeQuiz
- 03Sequence OperatorsChallengeQuiz
- 04The Contains MethodChallengeQuiz
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
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
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
Heaps & Priority Queues - Data Structures Series #7
NewIn this course, you will learn about the Heap data structure (the backbone of priority queues), create a MinHeap from zero using your preferred language, and practice coding challenges with it!
Certificate on completion
- 14
- 6
- 1
Binary Tree - Data Structures Series #3
In this course, you will learn about the Binary Tree data structure, create a Binary Tree from zero using your preferred language, and practice coding challenges with it!
- 13
- 5
- 1
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.