🌱 Mewar Basic Examples

← Back to Categories

1. Hello World

say "Hello World"

2. Printing Multiple Lines

say "Welcome"
say "To"
say "Mewar"

3. Variables

set name to "Karan"
say name

4. Numbers

set age to 21
say age

5. Strings

set city to "Ajmer"
say city

6. User Input

set username to ask "Enter your name"
say username

7. Input + Output

set username to ask "What is your name?"
say "Welcome " + username

8. Addition

set a to 10
set b to 20
say (a + b)

9. Subtraction

set a to 30
set b to 10
say (a - b)

10. Multiplication

set a to 5
set b to 6
say (a * b)

11. Division

set a to 100
 set b to 5
say (a / b)

12. Modulo

set num to 15
say (num % 2)

13. Comments

# This is a comment
say "Comments are ignored"

14. Variable Update

set gold to 100
set gold to 200
say gold

15. Simple Calculator

set a to ask "First Number:"
set b to ask "Second Number:"
say (a + b)