Logo Lanfrica

mnura361234-ship-it/hausalang

Domain:

natural language processing

Record type:

software
Creator:
mnu
Host:
Hausalang is a simple interpreted programming language designed to demonstrate core programming concepts using Hausa-inspired syntax. # Hausalang: A Beginner-Friendly Programming Language A simple, educational Hausa-inspired programming language designed for beginners to learn programming concepts in a familiar language context. ## 🚀 Try It Now **Open Hausalang Web Playground** - No installation required, code directly in your browser! ## Features ### Core Language Constructs - **Variables & Assignment**: Store and manipulate values ```hausa suna = "Fatima" adadi = 42 ``` - **Output (rubuta)**: Print values to console ```hausa rubuta "Sannu Duniya" # print string rubuta suna # print variable rubuta 3 + 4 # print expression result ``` - **Conditionals (idan / in ba haka ba)**: Control program flow with if/else ```hausa idan x > 10: rubuta "x is greater than 10" in ba haka ba: rubuta "x is 10 or less" ``` - **Elif (idan ... kuma)**: Chain conditional checks ```hausa idan x > 10 kuma: rubuta "greater than 10" idan x == 10 kuma: rubuta "equals 10" in ba haka ba: rubuta "less than 10" ``` - **Comments**: Ignore code for documentation (# outside strings) ```hausa # This is a comment suna = "Ali" # inline comment ``` - **Arithmetic Expressions**: Evaluate mathematical operations with proper precedence ```hausa rubuta 2 + 3 * 4 # prints 14 (order of operations respected) rubuta (2 + 3) * 4 # prints 20 ``` - **String Concatenation**: Combine strings with + ```hausa greet = "Sannu " + "Fatima" rubuta greet # prints "Sannu Fatima" ``` - **String Repetition**: Repeat strings with * ```hausa rubuta "ha" * 3 # prints "hahaha" ``` - **Comparisons**: Test values with ==, !=, >, =, 10: rubuta "greater than 10" in ba haka ba: rubuta "10 or less" ``` ### Functions ```hausa aiki add(a, b): mayar a + b suna = "Fatima" aiki greet(n): rubuta "Sannu " + n greet(suna) res = add(3, 4) rubuta res ``` ### Arithmetic ```hausa rubuta 10 + 5 # 15 rubuta 10 - 3 # 7 rubuta 5 * 4 # 20 rubuta 20 / 4 # 5.0 rubuta (2 + 3) * 4 # 20 ``` ## Imp …

Licenses