Kotlinlearncs.online LogoJava
Return to List

Solve: Date Fashion

Imported By: Geoffrey Challen
/ Version: 2021.6.0

You and your date are trying to get a table at a restaurant. The parameter you is the stylishness of your clothes, in the range 0..10, and date is the stylishness of your date's clothes, also in the same range. The result getting the table is encoded as an Int with 0=no, 1=maybe, 2=yes. If either of you is very stylish, 8 or more, then the result is yes. With the exception that if either of you has style of 2 or less, then the result is no. Otherwise the result is maybe.

fun dateFashion(
you: Int,
date: Int,
): Int {
return 0 // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: