DART-WEEK-ONE- Data Types Implementation:
Define Variables: Create a Dart program that defines and initializes variables of the following types: int, double, String, bool, and List.
Type Conversion: Implement functions to: Convert a String to int and double. Convert an int to String and double.
Function for Conversion: Write a function convertAndDisplay that: Takes a String representing a number. Converts the String to int and double. Prints the results.
Control Flow:
If-Else Statements: Implement a Dart program that: Uses if-else statements to check if a number is positive, negative, or zero. Uses if-else statements to determine if a person is eligible to vote based on age (must be 18 or older). Switch Case: Create a program that: Uses a switch statement to print the day of the week based on a given int (1 for Monday, 2 for Tuesday, etc.). Loops: Implement the following: A for loop that prints numbers from 1 to 10. A while loop that prints numbers from 10 to 1. A do-while loop that prints numbers from 1 to 5.
Combining Data Types and Control Flow:
Complex Example: Write a Dart program that: Defines a List of int numbers. Uses a for loop to iterate through the list and: Print each number. Use if-else statements to check if the number is even or odd. Implements a switch statement to categorize numbers into "small" (1-10), "medium" (11-100), or "large" (101+).