This file contains 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:math'; | |
void main() { | |
//loveCalculator1(); | |
//loveCalculator2(); | |
} |
This file contains 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 'package:flutter/material.dart'; | |
import 'question_bank.dart'; | |
QuestionBank questionBank = QuestionBank(); | |
void main() => runApp(Quizzler()); | |
class Quizzler extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
This file contains 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:math'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
return runApp( | |
MaterialApp( | |
home: Scaffold( | |
backgroundColor: Colors.red, | |
appBar: AppBar( | |
title: Text('Dicee'), |
This file contains 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:io'; | |
void main() { | |
performTasks(); | |
} | |
void performTasks() { | |
task1(); | |
task2(); | |
task3(); |
This file contains 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
List<int> winningNumbers = [12, 6, 34, 22, 41, 9]; | |
void main() { | |
List<int> ticket1 = [45, 2, 9, 18, 12, 33]; | |
List<int> ticket2 = [41, 17, 26, 32, 7, 35]; | |
checkNumbers(ticket1); |
This file contains 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 Foundation | |
struct QuizBrain { | |
var questionNumber = 0 | |
var score = 0 | |
let quiz = [ | |
Question(q: "A slug's blood is green.", a: "True"), | |
Question(q: "Approximately one quarter of human bones are in the feet.", a: "True"), |
This file contains 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
// | |
// ViewController.swift | |
// Dicee-iOS13 | |
// | |
// Created by Angela Yu on 11/06/2019. | |
// Copyright © 2019 London App Brewery. All rights reserved. | |
// | |
import UIKit |
This file contains 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
var a = 5 | |
var b = 8 | |
//Create a new variable c to store the value in b (c = 8) | |
var c = b | |
//Change the value of b to equal the value of a (b = 5) | |
b = a | |
//Change the value of a to equal the value of c (a = 8) |
This file contains 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
var numbers = [45, 73, 195, 53] | |
var n1 = numbers[0] * numbers[1] | |
var n2 = numbers[1] * numbers[2] | |
var n3 = numbers[2] * numbers[3] | |
var computedNumbers = [n1, n2, n3] | |
print(computedNumbers) |
This file contains 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 UIKit | |
class CalculateViewController: UIViewController { | |
@IBOutlet weak var heightLabel: UILabel! | |
@IBOutlet weak var weightLabel: UILabel! | |
@IBOutlet weak var heightSlider: UISlider! | |
@IBOutlet weak var weightSlider: UISlider! | |
//1. Create bmi property to store the calculated value. |