Skip to content

Instantly share code, notes, and snippets.

View CerysKulla's full-sized avatar

Cerys CerysKulla

View GitHub Profile
@CerysKulla
CerysKulla / fizzbuzz_challenge.dart
Last active October 3, 2025 06:47
fizzbuzz_challenge
void main() {
List<dynamic> numberIteration = [];
Map<String, int> counter = {};
for (var i = 1; i <= 100; i++) {
if (i % 3 == 0 && i % 5 == 0) {
numberIteration.add("FizzBuzz");
print("FizzBuzz");
} else if (i % 3 == 0) {
numberIteration.add("Fizz");
class Student {
String name;
int id;
List<String> enrolledCourses = [];
Student({required this.name, required this.id});
void enrollInCourse(String course) => enrolledCourses.add(course);
}
@CerysKulla
CerysKulla / pascalsTriangle.dart
Last active October 3, 2025 06:17
PascalsTriangle
List<List<int>> pascalsTriangle(int numRows) {
if (numRows < 1 || numRows > 30) {
throw ArgumentError("Number of Rows must not be lower than 1 or exceed 30");
}
List<List<int>> triangle = [];
for (int i = 0; i < numRows; i++) {
triangle.add([]);
for (int j = 0; j <= i; j++) {
@CerysKulla
CerysKulla / main.dart
Created September 14, 2025 05:28
Roman Numeral Convertor and Palindrome Checker
dynamic romanNumeralConvertor(String s) {
final pattern = RegExp(r'^[IVXLCDM]+$');
var integerValues = {
'I': 1,
'V': 5,
'X': 10,
'L': 50,
'C': 100,
'D': 500,
'M': 1000,