Solutions Pool

Feature
Link

Score count

Remove repeating questions

...

Countdown

var countdown = 10

while countdown > 0 {
    print("\(countdown)…")
    countdown -= 1
}

print("Blast off!")

/*
print:

10…
9…
8…
7…
6…
5…
4…
3…
2…
1…
Blast off!

*/

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-use-a-while-loop-to-repeat-work

Disable the field if it is empty

Image in a Text

Local Currency

Multiline TestFields

Parameters over Arguments

Always prioritize parameters (placeholders) over arguments (actual values).

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-reuse-code-with-functions

Random Number in a defined range

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-use-a-while-loop-to-repeat-work

Random Number in a defined range until a particular target

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-use-a-while-loop-to-repeat-work

Remainder of multiple numbers

Source: https://www.hackingwithswift.com/review/sixty/exiting-loops

Sum / Count until a certain point

Example 1;

Source: https://www.hackingwithswift.com/quick-start/beginners/how-to-skip-loop-items-with-break-and-continue

Example 2;

Source: https://www.hackingwithswift.com/quick-start/understanding-swift/why-would-you-want-to-exit-a-loop

Swipe-Left to Delete

Watermark

Last updated

Was this helpful?