Skip to content

Instantly share code, notes, and snippets.

@nduckwiler
nduckwiler / PracticeLINQ.cs
Created November 15, 2019 21:47
Examples of C# LINQ
using System;
using System.Collections.Generic;
using System.Linq;
namespace LearnLINQ
{
public class Program
{
public static void Main(string[] args)
{
@nduckwiler
nduckwiler / A-prerequisites.md
Last active October 24, 2019 21:03 — forked from ianmunrobot/0-prerequisites.md
Sample Content Associate Writing Sample

Prerequisites

To complete this, learners should have knowledge of the following JavaScript concepts:

  • Basic data types
  • Arithmetic operators
  • String concatentation
  • Using console.log to output information
@nduckwiler
nduckwiler / main.js
Created August 23, 2019 22:48
JavaScript Assessment 5d60619abc78fb5095c4531b Solution
// Prompt
// Use a loop to print the even numbers from 0 to 10.
// Option 1
for(let i = 0; i < 12; i +=2 ) {
console.log(i);
}
// Option 2
for (let i = 0; i < 11; i++) {
@nduckwiler
nduckwiler / main.js
Created August 23, 2019 22:46
JavaScript Assessment 5d605727bc78fb50a0c452a1 Solution
// Prompt
// Print the number and title for each value in titles. Make sure that the first in the list is 1, not 0.
// Option 1
titles = ['The Philosopher\'s Stone', 'The Chamber of Secrets', 'The Prisoner of Azkaban', 'The Goblet of Fire', 'The Order of the Phoenix', 'The Half-Blood Prince', 'The Deathly Hallows'];
for (let i = 0; i < titles.length; i++) {
console.log(`${i+1}. ${titles[i]}`);
}
@nduckwiler
nduckwiler / main.js
Created August 23, 2019 22:43
JavaScript Assessment 5d5ed59592bc1c1cc57cdf34 Solution
// Prompt
// Use string concatenation or interpolation to print creature in a sentence. It should look like this: A wild Golem appeared!
// Option 1
const creature = 'Golem';
console.log(`A wild ${creature} appeared!`);
// Option 2
const creature = 'Golem';
console.log('A wild ' + creature + ' appeared!')
@nduckwiler
nduckwiler / main.js
Created August 23, 2019 22:32
JavaScript Assessement 5d5eca9d225df379f05b054f Solution
/*
Prompt:
Work is piling up! Add 8 to tasks and print it to the console.
*/
// Option 1
let tasks = 2;
tasks = tasks + 8;
console.log(tasks);
@nduckwiler
nduckwiler / Program.cs
Last active June 5, 2019 15:50
Architect Arithmetic Extension
using System;
namespace ArchitectArithmetic
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("What monument would you like to work with?");
Console.Write("Choose Teotihuacan (1), Taj Mahal (2), or Great Mosque of Mecca (3): ");
@nduckwiler
nduckwiler / Program.cs
Created June 3, 2019 18:18
Working with Main
using System;
class MainClass {
public static void Main (string[] args) {
if (args.Length == 0)
{
Console.WriteLine("in if...");
CallMain();
}
else {
@nduckwiler
nduckwiler / Program.cs
Created April 8, 2019 18:22
MY cool console creatures
using System;
namespace ConsoleCreatures
{
class Program
{
static void Main()
{
Console.WriteLine(" .-.");
Console.WriteLine("(o o)");
@nduckwiler
nduckwiler / Test.cs
Created March 23, 2019 18:16
Test Templates for C#
// Tests for basic variable definition
if (!Components.CodeEditor.codeContains('Program.cs', /int\s+totalEmployees\s*=\s*86928\s*;/)) {
return {
pass: false,
errors: {
friendly: 'Did you define an `int` named `totalEmployees` with the value `86928`?',
component: 'PersistentCodeEditor'
}
};