Created
March 15, 2020 15:20
-
-
Save emlanis/a156c9f5991416f6268679b5881be522 to your computer and use it in GitHub Desktop.
Playing with the dart if conditionals by creating a simple love calculator in Hausa language
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'dart:math'; | |
| void main(){ | |
| loveCalculator(); | |
| } | |
| void loveCalculator() { | |
| int loveScore = Random().nextInt(100) + 1; | |
| print(loveScore); | |
| if(loveScore >= 70){ | |
| print('Gaskiya kuna son junan ku sosai π₯°π»π¬'); | |
| } | |
| else if(loveScore >= 50){ | |
| print('Ba laifi kuna son juna π'); | |
| } | |
| else if(loveScore >= 30){ | |
| print('Akwai yar matsala amma za\'a iya sasantawa π'); | |
| } | |
| else{ | |
| print('Ba ku son junan ku gaskiya π'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment