Questions for Practice 3

Create Free Backend With Appwrite

Question For Practice 3

  1. Write a program in Dart to print your own name using function.
  2. Write a program in Dart to print even numbers between intervals using function.
  3. Create a function called greet that takes a name as an argument and prints a greeting message. For example, greet(“John”) should print “Hello, John”.
  4. Write a program in Dart that generates random password.
  5. Write a program in Dart that find the area of a circle using function. Formula: pi * r * r
  6. Write a program in Dart to reverse a String using function.
  7. Write a program in Dart to calculate power of a certain number. For e.g 5^3=125
  8. Write a function in Dart named add that takes two numbers as arguments and returns their sum.
  9. Write a function in Dart called maxNumber that takes three numbers as arguments and returns the largest number.
  10. Write a function in Dart called isEven that takes a number as an argument and returns True if the number is even, and False otherwise.
  11. Write a function in Dart called createUser with parameters name, age, and isActive, where isActive has a default value of true.
  12. Write a function in Dart called calculateArea that calculates the area of a rectangle. It should take length and width as arguments, with a default value of 1 for both. Formula: length * width.