Skip to content

Instantly share code, notes, and snippets.

@emlanis
Created March 15, 2020 15:20
Show Gist options
  • Select an option

  • Save emlanis/a156c9f5991416f6268679b5881be522 to your computer and use it in GitHub Desktop.

Select an option

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
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