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
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <div id="quote-box" class="text-center"> | |
| <div id="text" class="my-auto"> | |
| <h1 id="quote">Quotation Here</h1> | |
| </div> | |
| <h3 id="author" class="items-center">Author Here</h3> | |
| <div class="row justify-content-center"> | |
| <div class="col-auto"> |
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
| void main() { | |
| for (int i = 1; i <= 50; i++) { | |
| String output = ''; | |
| if (i % 3 == 0) output += 'Fizz'; | |
| if (i % 5 == 0) output += ' Buzz'; | |
| print(output.isEmpty ? i.toString() : output.trim()); | |
| } | |
| } |
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 Car { | |
| String model; | |
| String brand; | |
| int _year; | |
| Car(this.brand, this.model, this._year); | |
| void honk() { | |
| print('beep beep'); | |
| } |
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 Dog { | |
| String name; | |
| int age; | |
| Dog({required this.name, required this.age}); | |
| void bark() { | |
| print('Woof! My name is $name and I am $age years old.'); | |
| } | |
| } |
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:async'; | |
| void main() { | |
| Future<dynamic>.delayed( | |
| Duration(seconds: 2), | |
| () { | |
| return 100; | |
| }, | |
| ) | |
| .then( |
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
| // ignore_for_file: prefer_const_constructors, prefer_const_literals_to_create_immutables | |
| import 'package:english_words/english_words.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:provider/provider.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } |
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
| void main() { | |
| //Question 1 | |
| /* | |
| * Using the variable defined at the bottom, print the following lines to the console | |
| * | |
| * mcdonald's - best burgers ever! | |
| * MCDONALD'S - BEST BURGERS EVER! | |
| * Contains the word 'best'? true | |
| * McDonald's - best breakfast muffin ever! |
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
| void main() { | |
| //Exercise 1 | |
| /*Question 1 | |
| Use the 3 variables declared below to print out the following | |
| to the console: | |
| Paul, a 35 year old, paid $400 to repair his father's car. | |
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
| void main() { | |
| int firstNumber = 10; | |
| int secondNumber = 51; | |
| String textHello = 'Hello world'; | |
| double average = (firstNumber + secondNumber) / 2; | |
| print('The average of ' + firstNumber.toString() + ' and ' | |
| + secondNumber.toString() + ' is ' + average.toString()); | |