This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Student{ | |
String name; | |
int id; | |
List<String> enrolledCourses; | |
Student(this.name, this.id, this.enrolledCourses); | |
void enrolledInCourse(String course){ | |
enrolledCourses.add(course); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//fizzbuzz | |
void processList(List list){ | |
int i = 1; | |
while(i <= 100){ | |
if ((i % 3 == 0) && (i % 5 == 0)){ | |
list.add("FizzBuzz"); | |
} | |
else if ((i % 3 == 0) && (i % 5 != 0)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Requires code to work in terminal because of dart:io | |
import 'dart:io'; | |
//this import can be deleted | |
import 'package:dart_application_3/dart_application_3.dart' | |
as dart_application_3; | |
bool validateInput(int numRows) { | |
if (numRows >= 1 && numRows <= 30) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:vmservice_io'; | |
import 'dart:io'; | |
// notes: | |
// written in vscode flutter | |
// contains problem 1 and 2 | |
// palindrome checker | |
String reverseNumber(String num) { |