Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. let difference = abs(targetValue - currentValue)
  2.  
  3. let points = 100 - difference
  4.  
  5. if difference < 0 {
  6.  
  7.  
  8.  
  9. score += points
  10.  
  11.  
  12.  
  13. let message = "You scored (points) points"
  14.  
  15. }
  16.  
  17.  
  18.  
  19. let message = "The value of the slider is: (currentValue)" +
  20.  
  21. "nThe target value is: (targetValue)" +
  22.  
  23. "nThe difference is: (difference)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement