BlogHide Resteemsdrago18121996 (68)in ita • 9 days agoLindergarten// // This is only a SKELETON file for the 'Kindergarten Garden' exercise. // It's been provided as a convenience to get you started writing code faster. // const DEFAULT_STUDENTS: Student[] =…drago18121996 (68)in ita • 10 days agoGarden// // This is only a SKELETON file for the 'Kindergarten Garden' exercise. // It's been provided as a convenience to get you started writing code faster. // const DEFAULT_STUDENTS = […drago18121996 (68)in ita • 11 days agoAngramexport class Anagram { input : string; constructor(input: string) { this.input = input.toLowerCase(); } public matches(...potentials: string[]): string[] { let res: string[] = []; let…drago18121996 (68)in ita • 14 days agoComplex informationexport class ComplexNumber { r : number; i : number; constructor(real: number, imaginary: number) { this.r = real; this.i = imaginary; } public get real(): number { return this.r; }…drago18121996 (68)in ita • 22 days agoBobusing System; using System.Text.RegularExpressions; public static class Bob { public static string Response(string statement) { string statementmod= statement.Trim(); bool isQuestion =…drago18121996 (68)in ita • 24 days agoPHPdeclare(strict_types=1); function steps(int $number): int{ if($number 1){ if($number % 2 ==0){ $number /= 2; } else{ $number = 3*$number+1; } $counter +=1; } return $counter; }drago18121996 (68)in ita • 25 days agoAccumulatedeclare(strict_types=1); function accumulate(array $input, callable $accumulator): array{ $result = []; for($i=0; $idrago18121996 (68)in ita • 26 days agoHandshakeexport const commands = (numb) => { let result = []; if(numb & 1) result.push('wink'); if(numb & 2) result.push('double blink'); if(numb & 4) result.push('close your eyes'); if(numb & 8)…drago18121996 (68)in ita • 28 days agoGrainsexport const square = (num) => { if(num 64) throw new Error('square must be between 1 and 64'); return 2n**BigInt(num-1); }; export const total = () => { let result = 0n; for(let i=0; idrago18121996 (68)in ita • 28 days agoComplex Numbers// // This is only a SKELETON file for the 'Complex Numbers' exercise. It's been provided as a // convenience to get you started writing code faster. // export class ComplexNumber {…drago18121996 (68)in ita • last monthBobexport const hey = (message) => { let new_mess = message.replace(/[^a-zA-Z]/g, '').trim(); let message_trim = message.trim(); if(!message_trim) {return "Fine. Be that way!"}…drago18121996 (68)in ita • last monthSchoolclass School: def init (self): self.student ={} self.history = [] def student_exists(self, name):drago18121996 (68)in ita • last monthSolutionexport const colorCode = (color) => COLORS.indexOf(color); export const COLORS = ["black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "grey", "white"];drago18121996 (68)in ita • last monthStrings!import string letters = string.ascii_lowercase consonant = ''.join([letter for letter in letters if letter in 'aeiou']) text = "many hands make light work." find = ''.join([letter for letter in…drago18121996 (68)in ita • last monthString inverseusing System; public static class ReverseString { public static string Reverse(string input) { char [] cArray = input.ToCharArray(); string reverse = String.Empty; for (int i = input.Length…drago18121996 (68)in ita • 2 months agoLedgerusing System; using System.Collections.Generic; using System.Globalization; using System.Linq; public class LedgerEntry{ public LedgerEntry(DateTime date, string desc, decimal chg){ Date =…drago18121996 (68)in ita • 2 months agoExerciseusing System; using System.Globalization; using System.Runtime.InteropServices; public enum Location{ NewYork, London, Paris } public enum AlertLevel{ Early, Standard, Late } public…drago18121996 (68)in ita • 2 months agoFootballusing System; using System.Collections.Generic; public static class PlayAnalyzer { public static string AnalyzeOnField(int shirtNum) { switch (shirtNum) { case 1: return "goalie"; break;…drago18121996 (68)in ita • 2 months agoIl nervosone tedescatodrago18121996 (68)in ita • 2 months agoRotational Cipherusing System; public static class RotationalCipher { public static string Rotate(string text, int shiftKey){ string letterN = ""; shiftKey %= 26; foreach(char i in text){…