rm -rf folderName
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
void main() { | |
List<String> myList = [ | |
'Angela', | |
'James', | |
'Katie', | |
'Jack', | |
]; | |
myList.add('Sodiq'); | |
print(myList); | |
} |
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() { | |
loveCaculator(); | |
} | |
void loveCalculator() { | |
int loveScore = Random().nextInt(100) + 1; | |
print(loveScore); | |
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
void main() { | |
Human sodiq = new Human(19); | |
sodiq.talk('I love you'); | |
} | |
class Human { | |
double height; | |
int age = 0; | |
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 urllib.request | |
endEpisode = int(input('Enter a end episode')) | |
for i in range(1, endEpisode): | |
q = str(i).zfill(2) | |
url = "http://d14.o2tv.org/Greys%20Anatomy/Season%2006/Greys%20Anatomy%20-%20S06E" + str(q) + "%20(O2TvSeries.Com).mp4" | |
print(url) | |
location = "/Users/User/Downloads/" + str(q) + ".mp4" | |
urllib.request.urlretrieve(url, location) |
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(){ | |
print(armstrong(153)); | |
} | |
armstrong(number) { | |
var myList = number.toString().split(""); | |
var c = myList.length; | |
var a = 0; | |
for (var i = 0; i < c; i++) { |
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(){ | |
print(armstrong(54748)); | |
} | |
armstrong(number) { | |
var myList = number.toString().split(""); | |
var c = myList.iterator; | |
var a = 0; | |
while (c.moveNext()) { |
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
void main() { | |
/* | |
Day 2 - Space Age Given an age in seconds, calculate how old someone would be on: Mercury: orbital period 87.97 Earth days Venus: orbital period 224.7 Earth days Earth: orbital period 365.25 Earth days Mars: orbital period 686.93 Earth days Jupiter: orbital period 4,330.6 Earth days Saturn: orbital period 10,755.7 Earth days Uranus: orbital period 30,687 Earth days Neptune: orbital period 60,190 Earth days So if you were told someone was 631152000 seconds old, you should be able to say that they're 31.69 Earth-years old, 83.04 Mercury-years old. | |
*/ | |
age(631152000); | |
} | |
age(age) { | |
double year = age / 86400; | |
String mercury = (year / 87.97).toStringAsFixed(2); |
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
void main() { | |
barnyard(head: 20, leg: 76); | |
} | |
barnyard({head, leg}) { | |
var goat = (leg / 2) - head; | |
var chicken = head - goat; | |
if (goat is int && | |
chicken is int && | |
!goat.isNegative && |
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
void main() { | |
letters("Omol-=adefASAFads23"); | |
} | |
letters(String letter) { | |
letter = letter.replaceAll(new RegExp(r'[^a-zA-Z]'), ''); | |
var myList = letter.split(""); | |
int upper = 0; | |
int lower = 0; | |
for (var i = 0; i < myList.length; i++) { |