diff --git a/200.html b/200.html index 4f4d8ff..2f00e7e 100644 --- a/200.html +++ b/200.html @@ -1 +1 @@ -WeCode
\ No newline at end of file +WeCode
\ No newline at end of file diff --git a/404.html b/404.html index f60cf12..f205ecb 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ -WeCode
WeCode
WeCode
\ No newline at end of file diff --git a/Problem/easy/countvowelsinsentence/index.html b/Problem/easy/countvowelsinsentence/index.html index 22c8e96..6ccd063 100644 --- a/Problem/easy/countvowelsinsentence/index.html +++ b/Problem/easy/countvowelsinsentence/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Count Vowels In a Sentence

Write a function that takes a sentence as a parameter and returns the number of vowels in the sentence. You can assume that the sentence will only contain lowercase letters, spaces, and punctuation.

sentence is a string that represents the sentence.

Hints

  • You'll want to use string.includes(character) to check if a character is a vowel.
  • You'll want to loop through each character in the sentence.
function countVowels(sentence) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • countVowels('hello world')3 : Not Run
  • countVowels('hello world.')3 : Not Run
  • countVowels('hello world, how are you?')8 : Not Run
  • countVowels('aeiou')5 : Not Run
  • countVowels('aeiouaeiouaeiou')15 : Not Run
  • countVowels('qwrtypsdfghjklzxcvbnm')0 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Count Vowels In a Sentence

Write a function that takes a sentence as a parameter and returns the number of vowels in the sentence. You can assume that the sentence will only contain lowercase letters, spaces, and punctuation.

sentence is a string that represents the sentence.

Hints

  • You'll want to use string.includes(character) to check if a character is a vowel.
  • You'll want to loop through each character in the sentence.
function countVowels(sentence) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • countVowels('hello world')3 : Not Run
  • countVowels('hello world.')3 : Not Run
  • countVowels('hello world, how are you?')8 : Not Run
  • countVowels('aeiou')5 : Not Run
  • countVowels('aeiouaeiouaeiou')15 : Not Run
  • countVowels('qwrtypsdfghjklzxcvbnm')0 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/hard/dynamic/index.html b/Problem/hard/dynamic/index.html index 87d7a06..845f789 100644 --- a/Problem/hard/dynamic/index.html +++ b/Problem/hard/dynamic/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Combinatorial Optimization

The knapsack problem is a problem in combinatorial optimization. Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

Example

Consider a set of items: {A, B, C, D} with weights {10, 20, 30, 40} and values {60, 100, 120, 130}. The maximum weight that can be carried is 50. The maximum value that can be obtained is 220 by taking items A and C.

Write a function that takes an array of objects (each object containing an item's weight and value) and a maximum weight, and returns the maximum value that can be obtained by selecting a combination of items such that the total weight is less than or equal to the maximum weight. In test cases, items is an array of objects, each with a weight and value. maxWeight is the maximum weight that can be carried. The function knapsackProblem is called with these arguments and returns the maximum value that can be obtained by selecting items such that the total weight is less than or equal to maxWeight. The hidden test cases work similarly with hiddenItems1, hiddenItems2, hiddenMaxWeight1, and hiddenMaxWeight2.

function knapsackProblem(items, maxWeight) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • knapsackProblem(items1, maxWeight1)220 : Not Run
  • knapsackProblem(items2, maxWeight2)100 : Not Run
  • knapsackProblem(items3, maxWeight3)2 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Combinatorial Optimization

The knapsack problem is a problem in combinatorial optimization. Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

Example

Consider a set of items: {A, B, C, D} with weights {10, 20, 30, 40} and values {60, 100, 120, 130}. The maximum weight that can be carried is 50. The maximum value that can be obtained is 220 by taking items A and C.

Write a function that takes an array of objects (each object containing an item's weight and value) and a maximum weight, and returns the maximum value that can be obtained by selecting a combination of items such that the total weight is less than or equal to the maximum weight. In test cases, items is an array of objects, each with a weight and value. maxWeight is the maximum weight that can be carried. The function knapsackProblem is called with these arguments and returns the maximum value that can be obtained by selecting items such that the total weight is less than or equal to maxWeight. The hidden test cases work similarly with hiddenItems1, hiddenItems2, hiddenMaxWeight1, and hiddenMaxWeight2.

function knapsackProblem(items, maxWeight) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • knapsackProblem(items1, maxWeight1)220 : Not Run
  • knapsackProblem(items2, maxWeight2)100 : Not Run
  • knapsackProblem(items3, maxWeight3)2 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/hard/graphtheory/index.html b/Problem/hard/graphtheory/index.html index d78e5e2..9d3766a 100644 --- a/Problem/hard/graphtheory/index.html +++ b/Problem/hard/graphtheory/index.html @@ -1,6 +1,6 @@ -WeCode
WeCode
Graph Theory

The Travelling Salesman Problem (TSP) is a classic algorithmic problem in the field of computer science and operations research. It focuses on optimization. In this problem, a salesman is given a list of cities, and must determine the shortest possible route that allows him to visit each city once and return to his original location.

  • The number of cities is between 2 and 10.
  • The distance between any two cities is between 1 and 100.

Example

Consider a set of cities: {A, B, C, D}. The distances between each pair of cities are given in a matrix form:

        A   B   C   D
+WeCode
WeCode
Graph Theory

The Travelling Salesman Problem (TSP) is a classic algorithmic problem in the field of computer science and operations research. It focuses on optimization. In this problem, a salesman is given a list of cities, and must determine the shortest possible route that allows him to visit each city once and return to his original location.

  • The number of cities is between 2 and 10.
  • The distance between any two cities is between 1 and 100.

Example

Consider a set of cities: {A, B, C, D}. The distances between each pair of cities are given in a matrix form:

        A   B   C   D
     A   0   10  15  20
-

The shortest possible route that visits each city once and returns to the original city is A -> B -> D -> C -> A with a total distance of 80.

Write a function that takes a matrix of distances between cities and returns the shortest possible route that a salesman can take to visit each city once and return to the original city.

function travellingSalesmanProblem(distances) {
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • travellingSalesmanProblem(distances1);80 : Not Run
  • travellingSalesmanProblem(distances2);31 : Not Run
  • travellingSalesmanProblem(distances3);21 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro1/index.html b/Problem/intro/intro1/index.html index 715eda2..490b01f 100644 --- a/Problem/intro/intro1/index.html +++ b/Problem/intro/intro1/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Learning to Code

Thought this course, we will be using JavaScript as our programming language.

You'll learn though a series of bite-sized programming challenges that will help you learn the basics of programming. The challenges are designed to be fun and engaging, and to help you learn how to think like a programmer. We'll start with the basics and gradually build up to more complex problems.

While we'll be using JavaScript, the concepts you'll learn are applicable to any programming language. We'll avoid going too deep into the language-specific details, and instead focus on the core concepts that are common to all programming languages.

Prerequisites

  • No prior programming experience is required.
  • Knowledge of algebra will be extremely helpful.
    • A lot of our problems will build on the concepts of algebra, so having a good understanding of algebra will be very helpful.
    • You don't need to be an expert, but you should be comfortable with basic algebraic concepts like variables, functions, function notation, and function composition.

What you'll learn

  • How to write javascript code.
  • How to solve problems using code.
  • How to think like a programmer.
  • How to break down complex problems into smaller, more manageable parts.
  • How to use code to solve real-world problems.
  • How to use code to automate repetitive tasks.

How to use this course

  • Each problem will be presented as a challenge that you need to solve.
  • You'll be given a problem statement, and you'll need to write a function that solves the problem.
  • You'll be given a set of test cases that your function should pass.
    • Some of the test cases will be visible to you, while others will be hidden to prevent you from basing your solution on the visible test cases. You should write your function so that it passes all the test cases.
    • You have unlimited attempts to solve each problem`.
  • Feel free to skip around and work on the problems in any order you like.
  • If you get stuck, press the "I'm stuck" button, and an AI-powered tutor will analyze your code and give you a hint to help get you unstuck!

Let's get started!

You're probably familiar with functions from algebra. In algebra, a function is a rule that assigns each input value to exactly one output value.

Take, for example:

f(x)=x+1f(x) = x + 1.

In this function, the input value is x, and the output value is x squared.

Let's try to write a function in JavaScript that does the same thing.

function f(x) {
+WeCode
WeCode
Learning to Code

Thought this course, we will be using JavaScript as our programming language.

You'll learn though a series of bite-sized programming challenges that will help you learn the basics of programming. The challenges are designed to be fun and engaging, and to help you learn how to think like a programmer. We'll start with the basics and gradually build up to more complex problems.

While we'll be using JavaScript, the concepts you'll learn are applicable to any programming language. We'll avoid going too deep into the language-specific details, and instead focus on the core concepts that are common to all programming languages.

Prerequisites

  • No prior programming experience is required.
  • Knowledge of algebra will be extremely helpful.
    • A lot of our problems will build on the concepts of algebra, so having a good understanding of algebra will be very helpful.
    • You don't need to be an expert, but you should be comfortable with basic algebraic concepts like variables, functions, function notation, and function composition.

What you'll learn

  • How to write javascript code.
  • How to solve problems using code.
  • How to think like a programmer.
  • How to break down complex problems into smaller, more manageable parts.
  • How to use code to solve real-world problems.
  • How to use code to automate repetitive tasks.

How to use this course

  • Each problem will be presented as a challenge that you need to solve.
  • You'll be given a problem statement, and you'll need to write a function that solves the problem.
  • You'll be given a set of test cases that your function should pass.
    • Some of the test cases will be visible to you, while others will be hidden to prevent you from basing your solution on the visible test cases. You should write your function so that it passes all the test cases.
    • You have unlimited attempts to solve each problem`.
  • Feel free to skip around and work on the problems in any order you like.
  • If you get stuck, press the "I'm stuck" button, and an AI-powered tutor will analyze your code and give you a hint to help get you unstuck!

Let's get started!

You're probably familiar with functions from algebra. In algebra, a function is a rule that assigns each input value to exactly one output value.

Take, for example:

f(x)=x+1f(x) = x + 1.

In this function, the input value is x, and the output value is x squared.

Let's try to write a function in JavaScript that does the same thing.

function f(x) {
     return x + 1;
 }
 

Notice that the function is defined using the function keyword. In javascript, the function keyword tells the computer that the following code is a function.

The text between the function keyword and the parentheses is the name of the function. In this case, the function is called f.

The parentheses that are immediately after the function name are where we put the input value to the function. You can think of the parentheses and variable, x inside them exactly like the variable and parentheses in the algebraic function.

The { and } are used to define the body of the function. You don't see these in math, but they tell JavaScript where the function starts and ends. So, the function begins after the { and ends after the }.

The return keyword tells the computer what the output value of the function is. When the computer sees the return keyword, it reads whatever code is after it and "returns" that value as the output of the function.

So, with the code above, we've defined a function called f that takes an input value x and returns x + 1.

If we wanted to use this function, we could call it like this:

f(3);
@@ -8,7 +8,7 @@
 

Here, we've defined a function called g that takes an input value x and returns x * 2.

So, if we called g(3), it would return 3 * 2, which is 6.

function h(a) {
     return a * a;
 }
-

Here, we've defined a function called h that takes an input value a and returns a * a. (or a squared)

So, if we called h(3), it would return 3 * 3, which is 9.

Your first challenge

Can you write the function for the following algebraic function?

f(x)=x+5f(x) = x + 5

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(1)6 : Not Run
  • f(2)7 : Not Run
  • f(3)8 : Not Run
  • f(4)9 : Not Run
  • f(-1)4 : Not Run
  • f(-2)3 : Not Run
  • f(-3)2 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro2/index.html b/Problem/intro/intro2/index.html index e773aaf..7ab5b42 100644 --- a/Problem/intro/intro2/index.html +++ b/Problem/intro/intro2/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Constant Functions

In algebra, we can define a function that returns a constant value.

For example, we can define a function f(x)=5f(x) = 5.

This function will always return 5, no matter what value of x we pass to it.

Let's write a function that returns a constant value. Write the algebraic function from above, f(x)=5f(x) = 5, as a JavaScript function.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(0)5 : Not Run
  • f(1)5 : Not Run
  • f(2)5 : Not Run
  • f(3)5 : Not Run
  • f(-1)5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Constant Functions

In algebra, we can define a function that returns a constant value.

For example, we can define a function f(x)=5f(x) = 5.

This function will always return 5, no matter what value of x we pass to it.

Let's write a function that returns a constant value. Write the algebraic function from above, f(x)=5f(x) = 5, as a JavaScript function.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(0)5 : Not Run
  • f(1)5 : Not Run
  • f(2)5 : Not Run
  • f(3)5 : Not Run
  • f(-1)5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro3/index.html b/Problem/intro/intro3/index.html index f36e5fe..9ae52ea 100644 --- a/Problem/intro/intro3/index.html +++ b/Problem/intro/intro3/index.html @@ -1,10 +1,10 @@ -WeCode
WeCode
Constant Functions 2

In algebra, it would be weird to define a function that has no input value. In programming, it's not so weird, and we do it all the time.

We've been writing functions that take an input value and return a value based on that input like this:

function f(x) {
+WeCode
WeCode
Constant Functions 2

In algebra, it would be weird to define a function that has no input value. In programming, it's not so weird, and we do it all the time.

We've been writing functions that take an input value and return a value based on that input like this:

function f(x) {
     return x * x + 5;
 }
 

But we can also write functions that don't take any input value at all, like this:

function f() {
     return 2.71828;
 }
-

Notice that there's no x in the parentheses after f. This means that f doesn't take any input value at all.

Also did you notice that the return value is a number with a decimal point? Numbers can have decimal points in JavaScript, just like in math. For us right now, you can write any real number you want in JavaScript. (This isn't technically true, but it's true enough for now.)

Let's write a function that returns a constant value, the first 7 digits of pi.

Notice that the function doesn't take any input value at all.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
There are no visible test cases

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro4/index.html b/Problem/intro/intro4/index.html index dd44bce..63cf677 100644 --- a/Problem/intro/intro4/index.html +++ b/Problem/intro/intro4/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Multiple Inputs

Like in math, we can create a function that takes multiple input values and returns a single value.

For example, the function f(x,y)=x+yf(x, y) = x + y. Looks like this in JavaScript:

function f(x, y) {
+WeCode
WeCode
Multiple Inputs

Like in math, we can create a function that takes multiple input values and returns a single value.

For example, the function f(x,y)=x+yf(x, y) = x + y. Looks like this in JavaScript:

function f(x, y) {
     return x + y;
 }
 

Here, we've defined a function called f that takes two input values x and y and returns x + y. Notice that the input values are separated by a comma in the parentheses after f. These are required and not putting them there will cause an error.

Nothing is preventing us from writing a function that takes 3, 4, 5, or even more input values.

Here we have a function that takes 3 input values and returns the sum of the squares of the input values:

function f(x, y, z) {
@@ -10,7 +10,7 @@
 

This is the same as the function above, but it's a little more clear what we want the computer to do.

Some functions that we want to write will require parentheses to make sure the computer does exactly what we want it to do.

For example, if we have:

f(a,b,c,d)=a2+2(a+b)+cf(a, b, c, d) = a^2 + 2 * (a + b) + c

We would write the function in JavaScript like this:

function f(a, b, c) {
     return a ** 2 + 2 * (a + b) + c;
 }
-

With parentheses in the exact same places as in the algebraic function.

Also note that we use "**" to denote an exponent in JavaScript. The "^" symbol is used for something else, and we'll learn about it later.

Let's try this

Let's write a function that takes 4 inputs and calculates the following:

f(a,b,c,d)=(3(a+b)2+c)df(a, b, c, d) = (3 * (a + b) ^ 2 + c) * d

Note:

Remember, in JavaScript, we use ** to denote an exponent.

הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(1, 2, 3, 4)120 : Not Run
  • f(0, 0, 0, 0)0 : Not Run
  • f(1, 1, 1, 1)13 : Not Run
  • f(2, 2, 2, 2)100 : Not Run
  • f(0, 0.75, 1.5, 5)15.9375 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/intro5/index.html b/Problem/intro/intro5/index.html index 5cf22e9..a31ff05 100644 --- a/Problem/intro/intro5/index.html +++ b/Problem/intro/intro5/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Piecewise Functions

In algebra, we can define a function made up of multiple functions also known as a piecewise function.

Example 1

Take, for example, the function f(x)f(x) defined as:

f(x)={x+1if x<0x1if x0f(x) = \begin{cases} x + 1 & \text{if } x < 0 \\ x - 1 & \text{if } x \geq 0 \end{cases}

This function is defined as two separate functions, one for when x<0x < 0 and one for when x0x \geq 0.

To do this in JavaScript, we need to use an if statement.

Let's first write out a JavaScript function that does the same thing as the algebraic function above. After that, I'll explain how it works.

function f(x) {
+WeCode
WeCode
Piecewise Functions

In algebra, we can define a function made up of multiple functions also known as a piecewise function.

Example 1

Take, for example, the function f(x)f(x) defined as:

f(x)={x+1if x<0x1if x0f(x) = \begin{cases} x + 1 & \text{if } x < 0 \\ x - 1 & \text{if } x \geq 0 \end{cases}

This function is defined as two separate functions, one for when x<0x < 0 and one for when x0x \geq 0.

To do this in JavaScript, we need to use an if statement.

Let's first write out a JavaScript function that does the same thing as the algebraic function above. After that, I'll explain how it works.

function f(x) {
     if (x < 0) {
         return x + 1;
     } else {
@@ -14,7 +14,7 @@
         return x + 1;
     }
 }
-

Line 2-3

The if statement checks if x >= -3 is true. If it is, the computer runs the code inside the braces that follow the if statement.

So, if x >= -3 is true, the computer will run return x ** 2;.

Notice that we use >= to denote "greater than or equal to" in JavaScript. The same is true for <= which denotes "less than or equal to".

Line 4–5

We have another thing we haven't seen before, the else if statement. The else if statement is used when we have more than one condition to check.

Like the else statement, the else if statement only runs if the condition in the if statements that proceed it are false. Additionally, like the if statement, the else if statement checks if the condition inside the parentheses is true before running the code inside the braces that follow it.

So, if -10 < x && x < -3 is true, the computer will run return 2 * x + 1;.

Notice that the && is used to denote an "and" in JavaScript. We must use two & symbols to denote an "and" in JavaScript. The single & symbol is used for something else, and we'll learn about it later.

Also note: -10 < x < -3 isn't valid JavaScript syntax. While in algebra we could write this, in JavaScript we can only perform one comparison at a time. (We need to split the comparison into two separate comparisons, -10 < x && x < -3.)

Line 6–8

The else statement is used to catch any values of x that don't satisfy the conditions in the if and else if statements. If there were more else if statements, the else statement would only run if all the conditions in the if and else if statements were false.

So, if x >= -3 is false and -10 < x && x < -3 is false, the computer will run return x + 1;.

Let's try this

Write a function that is equivalent to the following piecewise function:

f(x)={6x+3if x>4x21if 0x42x+1if 2x<0xif x<2f(x) = \begin{cases} 6x + 3 & \text{if } x > 4 \\ x^2 - 1 & \text{if } 0 \leq x \leq 4 \\ 2x + 1 & \text{if } -2 \leq x < 0 \\ -x & \text{if } x < -2 \end{cases}

Reference:

  • <= denotes "less than or equal to" in JavaScript.
  • >= denotes "greater than or equal to" in JavaScript.
  • && denotes "and" in JavaScript.
  • ** denotes an exponent in JavaScript.
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(5)33 : Not Run
  • f(4)15 : Not Run
  • f(3)8 : Not Run
  • f(0)-1 : Not Run
  • f(-1)-1 : Not Run
  • f(-2)-3 : Not Run
  • f(-3)3 : Not Run
  • f(-4)4 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/piecewisepractice1/index.html b/Problem/intro/piecewisepractice1/index.html index 931d7d9..2ba4941 100644 --- a/Problem/intro/piecewisepractice1/index.html +++ b/Problem/intro/piecewisepractice1/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Piecewise Function Practice 1

Write a function that is equivalent to the following piecewise function:

f(x)={3x+3if x>=8x3/21if 2<x<8x/4+1if 0<=x<=2x4/43x2+2x+1if x<0f(x) = \begin{cases} -3x + 3 & \text{if } x >= 8 \\ x^{3/2} - 1 & \text{if } 2 < x < 8 \\ x/4 + 1 & \text{if } 0 <= x <= 2 \\ x^4/4 - 3x^2 + 2x + 1 & \text{if } x < 0 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(8)-21 : Not Run
  • f(7)17.520259177452132 : Not Run
  • f(6)13.696938456699069 : Not Run
  • f(5)10.180339887498949 : Not Run
  • f(4)7 : Not Run
  • f(3)4.196152422706632 : Not Run
  • f(2)1.5 : Not Run
  • f(1)1.25 : Not Run
  • f(0)1 : Not Run
  • f(-1)-3.75 : Not Run
  • f(-2)-11 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Piecewise Function Practice 1

Write a function that is equivalent to the following piecewise function:

f(x)={3x+3if x>=8x3/21if 2<x<8x/4+1if 0<=x<=2x4/43x2+2x+1if x<0f(x) = \begin{cases} -3x + 3 & \text{if } x >= 8 \\ x^{3/2} - 1 & \text{if } 2 < x < 8 \\ x/4 + 1 & \text{if } 0 <= x <= 2 \\ x^4/4 - 3x^2 + 2x + 1 & \text{if } x < 0 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(8)-21 : Not Run
  • f(7)17.520259177452132 : Not Run
  • f(6)13.696938456699069 : Not Run
  • f(5)10.180339887498949 : Not Run
  • f(4)7 : Not Run
  • f(3)4.196152422706632 : Not Run
  • f(2)1.5 : Not Run
  • f(1)1.25 : Not Run
  • f(0)1 : Not Run
  • f(-1)-3.75 : Not Run
  • f(-2)-11 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/piecewisepractice2/index.html b/Problem/intro/piecewisepractice2/index.html index 1c40df2..ade6958 100644 --- a/Problem/intro/piecewisepractice2/index.html +++ b/Problem/intro/piecewisepractice2/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Piecewise Function Practice 2

Write a function that is equivalent to the following piecewise function:

f(x)={17x/4+2if x4x43if 6.5<x<4x2+1if 8x6.5x/2+1if x<8f(x) = \begin{cases} 17x/4 + 2 & \text{if } x \geq -4 \\ x^4 - 3 & \text{if } -6.5 < x < -4 \\ x^2 + 1 & \text{if } -8 \leq x \leq -6.5 \\ x/2 + 1 & \text{if } x < -8 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(-3)-10.75 : Not Run
  • f(-4)-15 : Not Run
  • f(-5)622 : Not Run
  • f(-6.5)43.25 : Not Run
  • f(-7)50 : Not Run
  • f(-8)65 : Not Run
  • f(-9)-3.5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Piecewise Function Practice 2

Write a function that is equivalent to the following piecewise function:

f(x)={17x/4+2if x4x43if 6.5<x<4x2+1if 8x6.5x/2+1if x<8f(x) = \begin{cases} 17x/4 + 2 & \text{if } x \geq -4 \\ x^4 - 3 & \text{if } -6.5 < x < -4 \\ x^2 + 1 & \text{if } -8 \leq x \leq -6.5 \\ x/2 + 1 & \text{if } x < -8 \end{cases}
function f(x) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • f(-3)-10.75 : Not Run
  • f(-4)-15 : Not Run
  • f(-5)622 : Not Run
  • f(-6.5)43.25 : Not Run
  • f(-7)50 : Not Run
  • f(-8)65 : Not Run
  • f(-9)-3.5 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/intro/piecewisepractice3/index.html b/Problem/intro/piecewisepractice3/index.html index e76e610..83eba0c 100644 --- a/Problem/intro/piecewisepractice3/index.html +++ b/Problem/intro/piecewisepractice3/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Failed to load problem intro/piecewisepractice3
WeCode
Failed to load problem intro/piecewisepractice3
\ No newline at end of file diff --git a/Problem/medium/binarysearchtree/index.html b/Problem/medium/binarysearchtree/index.html index 5f8d40d..bb5476d 100644 --- a/Problem/medium/binarysearchtree/index.html +++ b/Problem/medium/binarysearchtree/index.html @@ -1,11 +1,11 @@ -WeCode
WeCode
Binary Search Tree Traversal

Binary Search Trees (BST) are a fundamental data structure in computer science. They allow for efficient insertion, deletion, and lookup operations. One common operation performed on BSTs is traversal, where each node in the tree is visited in a specific order.

Example 1

Consider a BST with the following nodes: 8, 3, 10, 1, 6, 14, 4, 7, 13. The BST would look like this:

     8
+WeCode
WeCode
Binary Search Tree Traversal

Binary Search Trees (BST) are a fundamental data structure in computer science. They allow for efficient insertion, deletion, and lookup operations. One common operation performed on BSTs is traversal, where each node in the tree is visited in a specific order.

Example 1

Consider a BST with the following nodes: 8, 3, 10, 1, 6, 14, 4, 7, 13. The BST would look like this:

     8
     / \
    3   10
   / \   \
  1   6   14
 /     \   \
 4      7   13
-

A common traversal method is the in-order traversal, which visits the nodes in ascending order. The in-order traversal for this BST would be: 1, 3, 4, 6, 7, 8, 10, 13, 14.

In these test cases, we're creating a binary search tree with the TreeNode class. The root is the topmost node in the tree, from which all other nodes descend. In this case, the root node has a value of 8.

Let's try this

Write a function that performs an in-order traversal of a BST. The function should take the root of the BST as input and return an array of the nodes in ascending order.

function inOrderTraversal(root) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • inorderTraversal(root);1,3,4,6,7,8,10,13,14 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/medium/fibonacci/index.html b/Problem/medium/fibonacci/index.html index f02d1c3..a7a4afd 100644 --- a/Problem/medium/fibonacci/index.html +++ b/Problem/medium/fibonacci/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Fibonacci Problem

The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones. So,

fn=fn1+fn2f_n = f_{n-1} + f_{n-2}

For reference, the 0th and 1st numbers in the Fibonacci sequence are 0 and 1, respectively. The sequence starts like the following:

0,1,1,2,3,5,8,13,21,34,55,...0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...

Write a function that takes in a number n and returns the nth number in the Fibonacci sequence.

function findNthFibonacci(n) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • findNthFibonacci(0)0 : Not Run
  • findNthFibonacci(1)1 : Not Run
  • findNthFibonacci(2)1 : Not Run
  • findNthFibonacci(3)2 : Not Run
  • findNthFibonacci(4)3 : Not Run
  • findNthFibonacci(5)5 : Not Run
  • findNthFibonacci(6)8 : Not Run
  • findNthFibonacci(7)13 : Not Run
  • findNthFibonacci(8)21 : Not Run
  • findNthFibonacci(9)34 : Not Run
  • findNthFibonacci(10)55 : Not Run
  • findNthFibonacci(11)89 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Fibonacci Problem

The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones. So,

fn=fn1+fn2f_n = f_{n-1} + f_{n-2}

For reference, the 0th and 1st numbers in the Fibonacci sequence are 0 and 1, respectively. The sequence starts like the following:

0,1,1,2,3,5,8,13,21,34,55,...0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...

Write a function that takes in a number n and returns the nth number in the Fibonacci sequence.

function findNthFibonacci(n) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • findNthFibonacci(0)0 : Not Run
  • findNthFibonacci(1)1 : Not Run
  • findNthFibonacci(2)1 : Not Run
  • findNthFibonacci(3)2 : Not Run
  • findNthFibonacci(4)3 : Not Run
  • findNthFibonacci(5)5 : Not Run
  • findNthFibonacci(6)8 : Not Run
  • findNthFibonacci(7)13 : Not Run
  • findNthFibonacci(8)21 : Not Run
  • findNthFibonacci(9)34 : Not Run
  • findNthFibonacci(10)55 : Not Run
  • findNthFibonacci(11)89 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/Problem/medium/mergesort/index.html b/Problem/medium/mergesort/index.html index bfe6249..71f22c6 100644 --- a/Problem/medium/mergesort/index.html +++ b/Problem/medium/mergesort/index.html @@ -1,4 +1,4 @@ -WeCode
WeCode
Merge Sort

The merge sort algorithm is a divide and conquer algorithm that works by dividing the input array into two halves, sorting the two halves, and then merging them back together.

It is a recursive algorithm that uses the following steps:

  1. Divide the array into two halves.
  2. Recursively sort the two halves.
    • If the array has only one element, return the array. (Base case)
    • Otherwise, divide the array into two halves and recursively sort each half
  3. Merge the two halves back together in sorted order.
    • Note you'll probably want to write a helper function to merge the two halves together.
    • The merge function should take two arrays as arguments and return a single sorted array.
    • How can you use the fact that the two halves are already sorted to merge them together efficiently?
  4. Return the sorted array.

Useful Information:

  • You can use the slice method to divide the array into two halves.
    • Example: [1, 2, 3, 4, 5].slice(0, 3) returns [1, 2, 3].
  • You can use the concat method to merge two arrays together.
    • Example: [1, 2].concat([3, 4]) returns [1, 2, 3, 4].

Write a function that sorts an array of numbers using the merge sort algorithm.

function mergeSort(arr) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • mergeSort(arr)3,9,10,27,38,43,82 : Not Run
  • mergeSort(arr)-12,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 : Not Run
  • mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
  • mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
  • mergeSort(arr)-20,3,4,6,10,14,23,35,354,453,565,657,1000,1004 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

WeCode
Merge Sort

The merge sort algorithm is a divide and conquer algorithm that works by dividing the input array into two halves, sorting the two halves, and then merging them back together.

It is a recursive algorithm that uses the following steps:

  1. Divide the array into two halves.
  2. Recursively sort the two halves.
    • If the array has only one element, return the array. (Base case)
    • Otherwise, divide the array into two halves and recursively sort each half
  3. Merge the two halves back together in sorted order.
    • Note you'll probably want to write a helper function to merge the two halves together.
    • The merge function should take two arrays as arguments and return a single sorted array.
    • How can you use the fact that the two halves are already sorted to merge them together efficiently?
  4. Return the sorted array.

Useful Information:

  • You can use the slice method to divide the array into two halves.
    • Example: [1, 2, 3, 4, 5].slice(0, 3) returns [1, 2, 3].
  • You can use the concat method to merge two arrays together.
    • Example: [1, 2].concat([3, 4]) returns [1, 2, 3, 4].

Write a function that sorts an array of numbers using the merge sort algorithm.

function mergeSort(arr) {
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Tests
  • mergeSort(arr)3,9,10,27,38,43,82 : Not Run
  • mergeSort(arr)-12,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 : Not Run
  • mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
  • mergeSort(arr)1,2,3,4,5,6,7,8,9,10 : Not Run
  • mergeSort(arr)-20,3,4,6,10,14,23,35,354,453,565,657,1000,1004 : Not Run

Hidden tests will be run when you submit your code

When you press "I'm stuck", the AI tutor will respond here.

\ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json index 51ab7fe..d76d0d9 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,10 +1,11 @@ { "files": { - "main.css": "/static/css/main.3d89e9e4.css", - "main.js": "/static/js/main.c27976cb.js", - "static/js/221.ed47e118.chunk.js": "/static/js/221.ed47e118.chunk.js", - "static/js/843.b0a929a7.chunk.js": "/static/js/843.b0a929a7.chunk.js", - "static/js/853.f8edb0ba.chunk.js": "/static/js/853.f8edb0ba.chunk.js", + "main.css": "/static/css/main.420a9a19.css", + "main.js": "/static/js/main.f34bd028.js", + "static/js/786.7eeccd24.chunk.js": "/static/js/786.7eeccd24.chunk.js", + "static/js/843.55b31125.chunk.js": "/static/js/843.55b31125.chunk.js", + "static/js/248.7756e353.chunk.js": "/static/js/248.7756e353.chunk.js", + "static/js/853.4c6c25ca.chunk.js": "/static/js/853.4c6c25ca.chunk.js", "static/js/488.a8d036df.chunk.js": "/static/js/488.a8d036df.chunk.js", "static/js/780.c1ef71a3.chunk.js": "/static/js/780.c1ef71a3.chunk.js", "static/js/303.87c5ac7d.chunk.js": "/static/js/303.87c5ac7d.chunk.js", @@ -76,11 +77,12 @@ "static/media/KaTeX_Size3-Regular.woff2": "/static/media/KaTeX_Size3-Regular.e1951519f6f0596f7356.woff2", "static/media/github-mark-white.svg": "/static/media/github-mark-white.ac7f5ce28096dc43a49cbedeabffa77b.svg", "index.html": "/index.html", - "main.3d89e9e4.css.map": "/static/css/main.3d89e9e4.css.map", - "main.c27976cb.js.map": "/static/js/main.c27976cb.js.map", - "221.ed47e118.chunk.js.map": "/static/js/221.ed47e118.chunk.js.map", - "843.b0a929a7.chunk.js.map": "/static/js/843.b0a929a7.chunk.js.map", - "853.f8edb0ba.chunk.js.map": "/static/js/853.f8edb0ba.chunk.js.map", + "main.420a9a19.css.map": "/static/css/main.420a9a19.css.map", + "main.f34bd028.js.map": "/static/js/main.f34bd028.js.map", + "786.7eeccd24.chunk.js.map": "/static/js/786.7eeccd24.chunk.js.map", + "843.55b31125.chunk.js.map": "/static/js/843.55b31125.chunk.js.map", + "248.7756e353.chunk.js.map": "/static/js/248.7756e353.chunk.js.map", + "853.4c6c25ca.chunk.js.map": "/static/js/853.4c6c25ca.chunk.js.map", "488.a8d036df.chunk.js.map": "/static/js/488.a8d036df.chunk.js.map", "780.c1ef71a3.chunk.js.map": "/static/js/780.c1ef71a3.chunk.js.map", "303.87c5ac7d.chunk.js.map": "/static/js/303.87c5ac7d.chunk.js.map", @@ -92,7 +94,7 @@ "671.5426ab3a.chunk.js.map": "/static/js/671.5426ab3a.chunk.js.map" }, "entrypoints": [ - "static/css/main.3d89e9e4.css", - "static/js/main.c27976cb.js" + "static/css/main.420a9a19.css", + "static/js/main.f34bd028.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 6bd5fed..97a8c25 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -WeCode
Welcome to
WeCode
Your Coding Ally
Start Learning Now
How it Works
1. Code
An attempt at solving the fibbinachi problem
2. Test
Test results for the attempt at solving the fibbinachi problem. All but the first two tests failed
3. Ask for help
The AI tutor explaining why the remaining tests failed
4. Repeat & Learn
User going back to the problem to fix the issue
Problems
A Beginner's Guide to Coding
Is this you're first time coding? If so, start at the problem below. The problems begin with requiring no prior knowledge of coding and gradually increase in difficulty. If you have experience consider starting with the easy problems.
Easy Problems
Good for beginners to start building up their skills.
Medium Problems
Medium problems are a bit more challenging than easy problems and are a good fit for people who have some experience with coding.
Hard Problems
Hard problems are a good fit for people who are comfortable programming and want some problems to challenge their critical thinking skills.
Welcome to
WeCode
Your Coding Ally
Start Learning Now
How it Works
1. Code
An attempt at solving the fibbinachi problem
2. Test
Test results for the attempt at solving the fibbinachi problem. All but the first two tests failed
3. Ask for help
The AI tutor explaining why the remaining tests failed
4. Repeat & Learn
User going back to the problem to fix the issue
Problems
A Beginner's Guide to Coding
Is this you're first time coding? If so, start at the problem below. The problems begin with requiring no prior knowledge of coding and gradually increase in difficulty. If you have experience consider starting with the easy problems.
Easy Problems
Good for beginners to start building up their skills.
Medium Problems
Medium problems are a bit more challenging than easy problems and are a good fit for people who have some experience with coding.
Hard Problems
Hard problems are a good fit for people who are comfortable programming and want some problems to challenge their critical thinking skills.
\ No newline at end of file diff --git a/privacy/index.html b/privacy/index.html new file mode 100644 index 0000000..c7a05c9 --- /dev/null +++ b/privacy/index.html @@ -0,0 +1,4 @@ +WeCode
WeCode

Privacy Policy

Effective Date: May 18th 2024

1. Introduction

Welcome to We Code ("we", "our", "us"). We are committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our website https://wecode.dacubeking.com ("We Code"). Please read this policy carefully. If you do not agree with the terms of this Privacy Policy, please do not access We Code.

2. Information We Collect

A. GitHub Authentication:

  • We use GitHub for authentication.
  • Upon logging in, we collect your GitHub ID, name, and username. This information is used to identify and display your profile on We Code.

B. User Content:

  • When you write code for byte-sized coding problems on We Code, your code and test case results are stored locally on your browser's local storage.

C. API Requests:

  • If you use the "I'm stuck" feature, the code and test cases you submit are sent to our API. We use this information to call OpenAI or Google Vertex APIs for assistance from an AI tutor.
  • We also log your user ID and a timestamp for rate-limiting purposes. No other information is saved server-side.

D. Cloudflare Analytics:

  • Our website is proxied through Cloudflare, which collects analytics data. This includes cookies placed by Cloudflare for security and performance purposes. We do not use any other cookies.

3. How We Use Your Information

A. To Provide and Improve Our Services:

  • Displaying your profile information.
  • Storing your code and test case results in local storage for your convenience.
  • Providing AI-driven assistance when you're stuck.

B. Security and Analytics:

  • Enhancing the security and performance of We Code through Cloudflare.
  • Using Cloudflare analytics to understand Site usage and improve our services.

4. Disclosure of Your Information

We do not sell, trade, or otherwise transfer your personally identifiable information to outside parties except as described below:

  • Service Providers: We may share your information with third-party vendors (such as OpenAI and Google Vertex) to perform tasks on our behalf, such as providing AI tutoring services.
  • Legal Requirements: We may disclose your information if required to do so by law or in response to valid requests by public authorities.

5. Data Security

We use administrative, technical, and physical security measures to protect your personal information. However, no transmission over the Internet or electronic storage is completely secure, so we cannot guarantee its absolute security.

6. Your Choices

A. Local Storage:

  • You can clear your browser's local storage at any time to delete your code history and test case results.

B. Cookies:

  • As we rely on Cloudflare, you can manage Cloudflare's cookies through your browser settings.

7. Changes to This Privacy Policy

We may update this Privacy Policy from time to time. We will notify you of any changes by updating the "Effective Date" at the top of this Privacy Policy. You are advised to review this Privacy Policy periodically for any changes.

8. Contact Us

If you have any questions about this Privacy Policy, please contact us at contact@dacubeking.com.

\ No newline at end of file diff --git a/static/css/main.3d89e9e4.css b/static/css/main.3d89e9e4.css deleted file mode 100644 index fd896b9..0000000 --- a/static/css/main.3d89e9e4.css +++ /dev/null @@ -1,6 +0,0 @@ -body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace} - -/* -! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com -*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}h1{font-size:1.875rem;line-height:2.25rem}h1,h2{font-weight:700;margin-bottom:.25em;margin-top:1em}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem}h3,h4{font-weight:700;line-height:1.75rem;margin-bottom:.25em;margin-top:1em}h4{font-size:1.125rem}h5{font-weight:700}h5,h6{font-size:1rem;line-height:1.5rem;margin-bottom:.25em;margin-top:1em}h6{font-weight:600}ol,ul{list-style:circle;margin-left:1.5em}li{margin-bottom:-.2em}p{font-size:1rem;line-height:1.5rem;margin-bottom:1em}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.-mt-16{margin-top:-4rem}.-mt-5{margin-top:-1.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.ml-5{margin-left:1.25rem}.mr-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-\[calc\(100vh\*0\.60\)\]{height:60vh}.h-\[calc\(100vh\*0\.80\)\]{height:80vh}.h-auto{height:auto}.min-h-20{min-height:5rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-96{width:24rem}.w-full{width:100%}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-white-pink{--tw-border-opacity:1;border-color:rgb(248 230 247/var(--tw-border-opacity))}.bg-\[\#f8e6f7\]{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.bg-basically-black{--tw-bg-opacity:1;background-color:rgb(23 28 43/var(--tw-bg-opacity))}.bg-test-failed{--tw-bg-opacity:1;background-color:rgb(255 142 131/var(--tw-bg-opacity))}.bg-test-passed{--tw-bg-opacity:1;background-color:rgb(18 243 135/var(--tw-bg-opacity))}.bg-white-pink{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.p-2{padding:.5rem}.pb-5{padding-bottom:1.25rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-lg{font-size:1.125rem}.text-lg,.text-xl{line-height:1.75rem}.text-xl{font-size:1.25rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-semibold{font-weight:600}.italic{font-style:italic}.text-\[\#abb2bf\]{--tw-text-opacity:1;color:rgb(171 178 191/var(--tw-text-opacity))}.text-basically-black{--tw-text-opacity:1;color:rgb(23 28 43/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-bright-blue{--tw-text-opacity:1;color:rgb(46 146 240/var(--tw-text-opacity))}.text-bright-purple{--tw-text-opacity:1;color:rgb(164 117 240/var(--tw-text-opacity))}.text-error-red{--tw-text-opacity:1;color:rgb(239 69 71/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.decoration-gray-600{text-decoration-color:#4b5563}.underline-offset-2{text-underline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (max-width:900px){.flex-row{flex-direction:column}@media (max-width:900px){.w-1\/2{width:100%}}}.App,body{background-color:#1c1f23}.App{color:#efe9e7}.App-header{background-color:#282c34;color:#fff;display:flex;flex-direction:row;font-size:calc(10px + 2vmin);font-weight:bolder;height:calc(10px + 5vmin);justify-content:space-between;margin-bottom:0;padding:0 1em}.App-header,.Problem{align-items:center;margin-top:0}.Problem{flex-direction:column;justify-content:center;max-width:80em;min-height:100vh;padding-bottom:10em;padding-left:1em;padding-top:0;text-align:left;width:95%}.Problem-title{margin-top:0;padding-top:1em}.Problem-user-code{justify-items:left;margin-top:0;padding-left:5em}.Problem-template-code{font-size:1.2em;font-weight:700}.Problem-desc,.Problem-template-code{margin-bottom:0;margin-top:0;padding-left:0}.Problem-desc{max-width:70em}.Problem-desc,.Problem-solution{padding-bottom:0;padding-top:0;width:95%}.Problem-solution{margin-bottom:0;margin-top:0;max-width:50em;padding-left:0}.helpButton,.nextProblemButton,.submitButton{height:2em}code[class^=hljs-]{background:#000}.Code-tutor-response{margin-bottom:0;margin-top:0;max-width:50em;padding-bottom:0;padding-left:0;padding-top:0;width:95%}code{background-color:#282c34;border-radius:3px;color:#efe9e7;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:80%;padding:.2em .4em}.katex-mathml{display:none}.wecode-header{color:#f8e6f7;font-size:1.5em;text-decoration:none}.loginButton{height:2.75em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#282c34;color:#abb2bf}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -/*# sourceMappingURL=main.3d89e9e4.css.map*/ \ No newline at end of file diff --git a/static/css/main.3d89e9e4.css.map b/static/css/main.3d89e9e4.css.map deleted file mode 100644 index 22d6b63..0000000 --- a/static/css/main.3d89e9e4.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/css/main.3d89e9e4.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAKF,CAEA,KACE,uEAEF;;ACZA;;CAA0B,CAA1B,uCAA0B,CAA1B,qBAA0B,CAA1B,8BAA0B,CAA1B,wCAA0B,CAA1B,4BAA0B,CAA1B,uCAA0B,CAA1B,gHAA0B,CAA1B,8BAA0B,CAA1B,eAA0B,CAA1B,UAA0B,CAA1B,wBAA0B,CAA1B,QAA0B,CAA1B,uBAA0B,CAA1B,aAA0B,CAA1B,QAA0B,CAA1B,4DAA0B,CAA1B,gCAA0B,CAA1B,mCAA0B,CAA1B,mBAA0B,CAA1B,eAA0B,CAA1B,uBAA0B,CAA1B,2BAA0B,CAA1B,8CAA0B,CAA1B,mGAA0B,CAA1B,aAA0B,C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cAAe,CAHf,aAAc,CAId,SAEJ,CAEA,KACI,wBAAyB,CAKzB,iBAAkB,CAJlB,aAAc,CAGd,2EAAqF,CADrF,aAAc,CADd,iBAIJ,CAEA,cACI,YACJ,CAEA,eAGI,aAAc,CAFd,eAAgB,CAChB,oBAEJ,CAEA,aACI,aACJ,CCvMA,cAAc,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,UAAU,eAAe,CAAC,MAAoB,kBAAiB,CAA/B,aAAgC,CAAC,0BAA0B,aAAa,CAAC,iBAAiB,CAAC,yCAAyC,aAAa,CAAC,uEAAuE,aAAa,CAAC,cAAc,aAAa,CAAC,iFAAiF,aAAa,CAAC,yIAAyI,aAAa,CAAC,8EAA8E,aAAa,CAAC,0DAA0D,aAAa,CAAC,eAAe,iBAAiB,CAAC,aAAa,eAAe,CAAC,WAAW,yBAAyB","sources":["index.css","App.css","../node_modules/highlight.js/styles/atom-one-dark.min.css"],"sourcesContent":["body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n","@import 'tailwindcss/base';\r\n@import 'tailwindcss/components';\r\n@import 'tailwindcss/utilities';\r\n\r\n@layer base {\r\n h1 {\r\n @apply text-3xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h2 {\r\n @apply text-2xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h3 {\r\n @apply text-xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h4 {\r\n @apply text-lg;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h5 {\r\n @apply text-base;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h6 {\r\n @apply text-base;\r\n @apply font-semibold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n ol,\r\n ul {\r\n list-style: circle;\r\n margin-left: 1.5em;\r\n }\r\n\r\n li {\r\n margin-bottom: -0.2em;\r\n }\r\n\r\n p {\r\n @apply text-base;\r\n margin-bottom: 1em;\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .flex-row {\r\n flex-direction: column;\r\n }\r\n\r\n @media (max-width: 900px) {\r\n .w-1\\/2 {\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\nbody {\r\n background-color: #1C1F23;\r\n}\r\n\r\n.App {\r\n background-color: #1C1F23;\r\n color: #efe9e7;\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n height: calc(10px + 5vmin);;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding: 0 1em;\r\n font-weight: bolder;\r\n}\r\n\r\n.Problem {\r\n margin-top: 0;\r\n padding-top: 0;\r\n padding-bottom: 10em;\r\n padding-left: 1em;\r\n justify-content: center;\r\n align-items: center;\r\n text-align: left;\r\n min-height: 100vh;\r\n width: 95%;\r\n max-width: 80em;\r\n flex-direction: column;\r\n}\r\n\r\n.Problem-title {\r\n margin-top: 0;\r\n padding-top: 1em;\r\n}\r\n\r\n.Problem-user-code {\r\n margin-top: 0;\r\n padding-left: 5em;\r\n justify-items: left;\r\n}\r\n\r\n.Problem-template-code {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding-left: 0;\r\n font-size: 1.2em;\r\n font-weight: bold;\r\n}\r\n\r\n.Problem-desc {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 70em;\r\n}\r\n\r\n.Problem-solution {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\n.helpButton {\r\n height: 2em;\r\n}\r\n\r\n.submitButton {\r\n height: 2em;\r\n}\r\n\r\n.nextProblemButton {\r\n height: 2em;\r\n}\r\n\r\ncode[class^=\"hljs-\"] {\r\n background: #000;\r\n}\r\n\r\n.Code-tutor-response {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\ncode {\r\n background-color: #282c34;\r\n color: #efe9e7;\r\n padding: 0.2em 0.4em;\r\n font-size: 80%;\r\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\r\n border-radius: 3px;\r\n}\r\n\r\n.katex-mathml {\r\n display: none;\r\n}\r\n\r\n.wecode-header {\r\n font-size: 1.5em;\r\n text-decoration: none;\r\n color: #f8e6f7;\r\n}\r\n\r\n.loginButton {\r\n height: 2.75em;\r\n}","pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/css/main.420a9a19.css b/static/css/main.420a9a19.css new file mode 100644 index 0000000..8c366e8 --- /dev/null +++ b/static/css/main.420a9a19.css @@ -0,0 +1,6 @@ +body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace} + +/* +! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com +*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}h1{font-size:1.875rem;line-height:2.25rem}h1,h2{font-weight:700;margin-bottom:.25em;margin-top:1em}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem}h3,h4{font-weight:700;line-height:1.75rem;margin-bottom:.25em;margin-top:1em}h4{font-size:1.125rem}h5{font-weight:700}h5,h6{font-size:1rem;line-height:1.5rem;margin-bottom:.25em;margin-top:1em}h6{font-weight:600}ol,ul{list-style:circle;margin-left:1.5em;margin-top:0}li{margin-bottom:-.2em}p{font-size:1rem;line-height:1.5rem;margin-bottom:1em}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.absolute{position:absolute}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-16{margin-top:-4rem}.-mt-5{margin-top:-1.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-1{margin-left:.25rem}.ml-5{margin-left:1.25rem}.mr-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.hidden{display:none}.h-\[calc\(100vh\*0\.60\)\]{height:60vh}.h-\[calc\(100vh\*0\.80\)\]{height:80vh}.h-auto{height:auto}.min-h-20{min-height:5rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-96{width:24rem}.w-full{width:100%}.max-w-4xl{max-width:56rem}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.rounded{border-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-white-pink{--tw-border-opacity:1;border-color:rgb(248 230 247/var(--tw-border-opacity))}.bg-\[\#f8e6f7\]{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.bg-basically-black{--tw-bg-opacity:1;background-color:rgb(23 28 43/var(--tw-bg-opacity))}.bg-test-failed{--tw-bg-opacity:1;background-color:rgb(255 142 131/var(--tw-bg-opacity))}.bg-test-passed{--tw-bg-opacity:1;background-color:rgb(18 243 135/var(--tw-bg-opacity))}.bg-white-pink{--tw-bg-opacity:1;background-color:rgb(248 230 247/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-8{padding:2rem}.pb-5{padding-bottom:1.25rem}.pl-1{padding-left:.25rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-7xl{font-size:4.5rem;line-height:1}.text-9xl{font-size:8rem;line-height:1}.text-lg{font-size:1.125rem}.text-lg,.text-xl{line-height:1.75rem}.text-xl{font-size:1.25rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-semibold{font-weight:600}.italic{font-style:italic}.text-\[\#abb2bf\]{--tw-text-opacity:1;color:rgb(171 178 191/var(--tw-text-opacity))}.text-basically-black{--tw-text-opacity:1;color:rgb(23 28 43/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-bright-blue{--tw-text-opacity:1;color:rgb(46 146 240/var(--tw-text-opacity))}.text-bright-purple{--tw-text-opacity:1;color:rgb(164 117 240/var(--tw-text-opacity))}.text-error-red{--tw-text-opacity:1;color:rgb(239 69 71/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.decoration-gray-600{text-decoration-color:#4b5563}.underline-offset-2{text-underline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (max-width:900px){.flex-row{flex-direction:column}@media (max-width:900px){.w-1\/2{width:100%}}}.App,body{background-color:#1c1f23}.App{color:#efe9e7}.App-header{background-color:#282c34;color:#fff;display:flex;flex-direction:row;font-size:calc(10px + 2vmin);font-weight:bolder;height:calc(10px + 5vmin);justify-content:space-between;margin-bottom:0;padding:0 1em}.App-header,.Problem{align-items:center;margin-top:0}.Problem{flex-direction:column;justify-content:center;max-width:80em;min-height:100vh;padding-bottom:10em;padding-left:1em;padding-top:0;text-align:left;width:95%}.Problem-title{margin-top:0;padding-top:1em}.Problem-user-code{justify-items:left;margin-top:0;padding-left:5em}.Problem-template-code{font-size:1.2em;font-weight:700}.Problem-desc,.Problem-template-code{margin-bottom:0;margin-top:0;padding-left:0}.Problem-desc{max-width:70em}.Problem-desc,.Problem-solution{padding-bottom:0;padding-top:0;width:95%}.Problem-solution{margin-bottom:0;margin-top:0;max-width:50em;padding-left:0}.helpButton,.nextProblemButton,.submitButton{height:2em}code[class^=hljs-]{background:#000}.Code-tutor-response{margin-bottom:0;margin-top:0;max-width:50em;padding-bottom:0;padding-left:0;padding-top:0;width:95%}code{background-color:#282c34;border-radius:3px;color:#efe9e7;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:80%;padding:.2em .4em}.katex-mathml{display:none}.wecode-header{color:#f8e6f7;font-size:1.5em;text-decoration:none}.loginButton{height:2.75em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#282c34;color:#abb2bf}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} +/*# sourceMappingURL=main.420a9a19.css.map*/ \ No newline at end of file diff --git a/static/css/main.420a9a19.css.map b/static/css/main.420a9a19.css.map new file mode 100644 index 0000000..75d182f --- /dev/null +++ b/static/css/main.420a9a19.css.map @@ -0,0 +1 @@ +{"version":3,"file":"static/css/main.420a9a19.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAKF,CAEA,KACE,uEAEF;;ACZA;;CAA0B,CAA1B,uCAA0B,CAA1B,qBAA0B,CAA1B,8BAA0B,CAA1B,wCAA0B,CAA1B,4BAA0B,CAA1B,uCAA0B,CAA1B,gHAA0B,CAA1B,8BAA0B,CAA1B,eAA0B,CAA1B,UAA0B,CAA1B,wBAA0B,CAA1B,QAA0B,CAA1B,uBAA0B,CAA1B,aAA0B,CAA1B,QAA0B,CAA1B,4DAA0B,CAA1B,gCAA0B,CAA1B,mCAA0B,CAA1B,mBAA0B,CAA1B,eAA0B,CAA1B,uBAA0B,CAA1B,2BAA0B,CAA1B,8CAA0B,CAA1B,mGAA0B,CAA1B,aAA0B,CAA1B,8BAA0B,CAA1B,mBAA0B,CAA1B,qBAA0B,CAA1B,aAA0B,CAA1B,iBAA0B,CAA1B,sBAA0B,CAA1B,iBAA0B,CAA1B,aAA0B,CAA1B,8BAA0B,CAA1B,oBAA0B,CAA1B,aAA0B,CAA1B,mEAA0B,CAA1B,aAA0B,CAA1B,mBAA0B,CAA1B,cAA0B,CAA1B,+BAA0B,CAA1B,mBAA0B,CAA1B,sBAA0B,CAA1B,mBAA0B,CAA1B,QAA0B,CAA1B,SAA0B,CAA1B,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,CAGd,2EAAqF,CADrF,aAAc,CADd,iBAIJ,CAEA,cACI,YACJ,CAEA,eAGI,aAAc,CAFd,eAAgB,CAChB,oBAEJ,CAEA,aACI,aACJ,CCxMA,cAAc,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,UAAU,eAAe,CAAC,MAAoB,kBAAiB,CAA/B,aAAgC,CAAC,0BAA0B,aAAa,CAAC,iBAAiB,CAAC,yCAAyC,aAAa,CAAC,uEAAuE,aAAa,CAAC,cAAc,aAAa,CAAC,iFAAiF,aAAa,CAAC,yIAAyI,aAAa,CAAC,8EAA8E,aAAa,CAAC,0DAA0D,aAAa,CAAC,eAAe,iBAAiB,CAAC,aAAa,eAAe,CAAC,WAAW,yBAAyB","sources":["index.css","App.css","../node_modules/highlight.js/styles/atom-one-dark.min.css"],"sourcesContent":["body {\r\n margin: 0;\r\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\r\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\r\n sans-serif;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\ncode {\r\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\r\n monospace;\r\n}\r\n","@import 'tailwindcss/base';\r\n@import 'tailwindcss/components';\r\n@import 'tailwindcss/utilities';\r\n\r\n@layer base {\r\n h1 {\r\n @apply text-3xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h2 {\r\n @apply text-2xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h3 {\r\n @apply text-xl;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h4 {\r\n @apply text-lg;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h5 {\r\n @apply text-base;\r\n @apply font-bold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n h6 {\r\n @apply text-base;\r\n @apply font-semibold;\r\n margin-bottom: 0.25em;\r\n margin-top: 1em;\r\n }\r\n\r\n ol,\r\n ul {\r\n margin-top: 0;\r\n list-style: circle;\r\n margin-left: 1.5em;\r\n }\r\n\r\n li {\r\n margin-bottom: -0.2em;\r\n }\r\n\r\n p {\r\n @apply text-base;\r\n margin-bottom: 1em;\r\n }\r\n}\r\n\r\n@media (max-width: 900px) {\r\n .flex-row {\r\n flex-direction: column;\r\n }\r\n\r\n @media (max-width: 900px) {\r\n .w-1\\/2 {\r\n width: 100%;\r\n }\r\n }\r\n}\r\n\r\nbody {\r\n background-color: #1C1F23;\r\n}\r\n\r\n.App {\r\n background-color: #1C1F23;\r\n color: #efe9e7;\r\n}\r\n\r\n.App-header {\r\n background-color: #282c34;\r\n height: calc(10px + 5vmin);;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n font-size: calc(10px + 2vmin);\r\n color: white;\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding: 0 1em;\r\n font-weight: bolder;\r\n}\r\n\r\n.Problem {\r\n margin-top: 0;\r\n padding-top: 0;\r\n padding-bottom: 10em;\r\n padding-left: 1em;\r\n justify-content: center;\r\n align-items: center;\r\n text-align: left;\r\n min-height: 100vh;\r\n width: 95%;\r\n max-width: 80em;\r\n flex-direction: column;\r\n}\r\n\r\n.Problem-title {\r\n margin-top: 0;\r\n padding-top: 1em;\r\n}\r\n\r\n.Problem-user-code {\r\n margin-top: 0;\r\n padding-left: 5em;\r\n justify-items: left;\r\n}\r\n\r\n.Problem-template-code {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n padding-left: 0;\r\n font-size: 1.2em;\r\n font-weight: bold;\r\n}\r\n\r\n.Problem-desc {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 70em;\r\n}\r\n\r\n.Problem-solution {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\n.helpButton {\r\n height: 2em;\r\n}\r\n\r\n.submitButton {\r\n height: 2em;\r\n}\r\n\r\n.nextProblemButton {\r\n height: 2em;\r\n}\r\n\r\ncode[class^=\"hljs-\"] {\r\n background: #000;\r\n}\r\n\r\n.Code-tutor-response {\r\n margin-top: 0;\r\n padding-top: 0;\r\n margin-bottom: 0;\r\n padding-bottom: 0;\r\n padding-left: 0;\r\n width: 95%;\r\n max-width: 50em;\r\n}\r\n\r\ncode {\r\n background-color: #282c34;\r\n color: #efe9e7;\r\n padding: 0.2em 0.4em;\r\n font-size: 80%;\r\n font-family: \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace;\r\n border-radius: 3px;\r\n}\r\n\r\n.katex-mathml {\r\n display: none;\r\n}\r\n\r\n.wecode-header {\r\n font-size: 1.5em;\r\n text-decoration: none;\r\n color: #f8e6f7;\r\n}\r\n\r\n.loginButton {\r\n height: 2.75em;\r\n}","pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/221.ed47e118.chunk.js b/static/js/221.ed47e118.chunk.js deleted file mode 100644 index 60870e3..0000000 --- a/static/js/221.ed47e118.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[221],{8221:(e,s,l)=>{l.r(s),l.d(s,{default:()=>n});var t=l(5043),i=l(5475),a=l(9473),c=l(579);const n=function(){const[e,s]=(0,t.useState)(null);function l(e){let{index:s,children:l}=e,t=n(s),i=n(s+1);return(0,c.jsxs)("div",{style:{background:t},children:[l,(0,c.jsx)("div",{style:{background:i},children:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 72",className:"pb-5",children:(0,c.jsx)("path",{fill:t,d:"M0,60.56c55.63-30.1,102.12-38.64,133.59-41.06c37.46-2.88,94.56,7.7,207.25,28.99\r c72.83,13.76,91.25,18.65,123.67,12.56c55.51-10.42,56.68-35.11,104.35-37.2c52.67-2.31,79.26,26.62,124.64,10.63\r c17.13-6.04,29.35-15.8,36.71-22.71L720,0H0V60.56z"})})})]})}function n(e){const s=["#f8e6f7","#e6f7f8","#f7f8e6","#e6f8f7","#f7e6f8","#f8f7e6"];return s[e%s.length]}return(0,t.useEffect)((()=>{fetch("/problem_locations.json").then((async e=>{if(!e.ok)throw new Error("Network response was not ok");return await e.json()})).then((e=>{s(e)})).catch((e=>{console.error("Error loading available problems",e)}))}),[]),(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"flex justify-between h-[calc(100vh*0.60)] bg-white-pink",children:[(0,c.jsx)("div",{className:"flex justify-center items-center",children:(0,c.jsxs)("div",{className:"-mt-16 w-2/3",children:[(0,c.jsx)("div",{className:"text-3xl text-black font-bold",children:"Welcome to"}),(0,c.jsx)("div",{className:"text-9xl font-extrabold text-bright-purple -mt-5",children:"WeCode"}),(0,c.jsx)("div",{className:"text-xl text-black font-semibold mt-5 pl-4",children:"Your Coding Ally"}),(0,c.jsx)(a.N_,{to:"problems",smooth:!0,duration:500,children:(0,c.jsx)("div",{className:"text-xl text-bright-blue underline font-semibold pl-4",children:"Start Learning Now"})})]})}),(0,c.jsx)("div",{className:"flex w-1/3 justify-center items-center",children:(0,c.jsx)("div",{className:" text-black font-bold"})})]}),(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 72",className:"mb-5",children:(0,c.jsx)("path",{fill:"#f8e6f7",d:"M0,60.56c55.63-30.1,102.12-38.64,133.59-41.06c37.46-2.88,94.56,7.7,207.25,28.99\r c72.83,13.76,91.25,18.65,123.67,12.56c55.51-10.42,56.68-35.11,104.35-37.2c52.67-2.31,79.26,26.62,124.64,10.63\r c17.13-6.04,29.35-15.8,36.71-22.71L720,0H0V60.56z"})}),(0,c.jsxs)("div",{className:"ml-5 mt-16",children:[(0,c.jsx)("div",{className:"text-5xl font-bold",children:"How it Works"}),(0,c.jsxs)("div",{className:"flex flex-row ml-5 mr-5 ",children:[(0,c.jsxs)("div",{className:"",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"1. Code"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ex-code.png",alt:"An attempt at solving the fibbinachi problem"})]}),(0,c.jsxs)("div",{className:"ml-5",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"2. Test"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ex-test.png",alt:"Test results for the attempt at solving the fibbinachi problem. All but the first two tests failed"})]}),(0,c.jsxs)("div",{className:"ml-5",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"3. Ask for help"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ask-for-help.png",alt:"The AI tutor explaining why the remaining tests failed"})]}),(0,c.jsxs)("div",{className:"ml-5",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"4. Repeat & Learn"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ex-repeat.png",alt:"User going back to the problem to fix the issue"})]})]})]}),(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 72",className:"pb-5 bg-[#f8e6f7]",children:(0,c.jsx)("path",{fill:"#1C1F23",d:"M0,60.56c55.63-30.1,102.12-38.64,133.59-41.06c37.46-2.88,94.56,7.7,207.25,28.99\r c72.83,13.76,91.25,18.65,123.67,12.56c55.51-10.42,56.68-35.11,104.35-37.2c52.67-2.31,79.26,26.62,124.64,10.63\r c17.13-6.04,29.35-15.8,36.71-22.71L720,0H0V60.56z"})}),(0,c.jsx)("div",{id:"problems",className:"text-5xl font-bold pt-8 bg-[#f8e6f7] text-basically-black pl-4 ",children:"Problems"}),(0,c.jsx)("div",{className:"w-full",children:function e(s){return s.map(((s,t)=>"directory"in s?(0,c.jsx)(l,{index:t,children:(0,c.jsxs)("div",{className:"pb-5 ml-5 text-basically-black w-1/2",children:[(0,c.jsxs)("div",{className:"text-3xl font-bold",children:[" ",s.meta.title," "]}),(0,c.jsxs)("div",{className:"text-lg",children:[" ",s.meta.description," "]}),(0,c.jsxs)("div",{className:"pl-4",children:[" ",e(s.files)," "]})]})},t):(0,c.jsx)("div",{children:(0,c.jsx)(i.N_,{to:"/Problem"+s.problemId,className:"text-bright-blue underline text-lg",children:s.problemName})},t)))}((null===e||void 0===e?void 0:e.files)||[])})]})}}}]); -//# sourceMappingURL=221.ed47e118.chunk.js.map \ No newline at end of file diff --git a/static/js/221.ed47e118.chunk.js.map b/static/js/221.ed47e118.chunk.js.map deleted file mode 100644 index d1b21ed..0000000 --- a/static/js/221.ed47e118.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"static/js/221.ed47e118.chunk.js","mappings":"gMA8JA,QA1IA,WACI,MAAOA,EAAMC,IA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,OAAKC,MAAM,6BAA6BC,QAAQ,aAAaC,UAAU,oBAAmBV,UACtFO,EAAAA,EAAAA,KAAA,QAAMI,KAAM,UACNC,EAAE,2PAIZL,EAAAA,EAAAA,KAAA,OAAKyB,GAAG,WAAWtB,UAAU,kEAAiEV,SAAC,cAG/FO,EAAAA,EAAAA,KAAA,OAAKG,UAAU,SAAQV,SAtF/B,SAASiC,EAAsBvC,GAC3B,OAAOA,EAAKwC,KAAI,CAACC,EAAMpC,IACf,cAAeoC,GAEX5B,EAAAA,EAAAA,KAACV,EAAc,CAAaE,MAAOA,EAAMC,UACrCI,EAAAA,EAAAA,MAAA,OAAKM,UAAW,uCAAuCV,SAAA,EACnDI,EAAAA,EAAAA,MAAA,OAAKM,UAAU,qBAAoBV,SAAA,CAAC,IAAEmC,EAAKC,KAAKC,MAAM,QACtDjC,EAAAA,EAAAA,MAAA,OAAKM,UAAU,UAASV,SAAA,CAAC,IAAEmC,EAAKC,KAAKE,YAAY,QACjDlC,EAAAA,EAAAA,MAAA,OAAKM,UAAU,OAAMV,SAAA,CAAC,IAAEiC,EAAsBE,EAAKI,OAAO,WAJ7CxC,IASlBQ,EAAAA,EAAAA,KAAA,OAAAP,UACHO,EAAAA,EAAAA,KAACiC,EAAAA,GAAI,CAACb,GAAI,WAAaQ,EAAKM,UAAW/B,UAAW,qCAAqCV,SAClFmC,EAAKO,eAFG3C,IAO7B,CAmEakC,EAA0B,OAAJvC,QAAI,IAAJA,OAAI,EAAJA,EAAM6C,QAAS,QAKtD,C","sources":["Home.tsx"],"sourcesContent":["import React, {useEffect, useState} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport {Link as ScrollLink} from 'react-scroll'\r\n\r\nclass ProblemData {\r\n problemName: string = \"\";\r\n problemId: string = \"\";\r\n}\r\n\r\nclass ProblemDirData {\r\n \"directory\": string = \"\";\r\n \"meta\": {\r\n \"displayStyle\": string\r\n \"title\": string\r\n \"description\": string\r\n \"weight\": number\r\n }\r\n \"files\": (ProblemData | ProblemDirData)[]\r\n}\r\n\r\nfunction Home() {\r\n const [data, setData] = useState(null as ProblemDirData | null);\r\n\r\n useEffect(() => {\r\n fetch(process.env.PUBLIC_URL + \"/problem_locations.json\")\r\n .then(async response => {\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok');\r\n }\r\n return await (response.json()) as ProblemDirData\r\n })\r\n .then(data => {\r\n setData(data);\r\n })\r\n .catch(error => {\r\n console.error('Error loading available problems', error);\r\n });\r\n }, []);\r\n\r\n\r\n type ProblemSectionProps = {\r\n index: number;\r\n children: React.ReactNode;\r\n };\r\n\r\n function ProblemSection({index, children}: ProblemSectionProps) {\r\n let color = getColorForProblemSection(index);\r\n let color2 = getColorForProblemSection(index + 1);\r\n return (\r\n \r\n {children}\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n function getProblemFolderAsJSX(data: (ProblemData | ProblemDirData)[]) {\r\n return data.map((item, index) => {\r\n if ('directory' in item) {\r\n return (\r\n \r\n
\r\n
{item.meta.title}
\r\n
{item.meta.description}
\r\n
{getProblemFolderAsJSX(item.files)}
\r\n
\r\n
\r\n );\r\n } else {\r\n return
\r\n \r\n {item.problemName}\r\n \r\n
\r\n }\r\n });\r\n }\r\n\r\n function getColorForProblemSection(index: number): string {\r\n const colors = ['#f8e6f7', '#e6f7f8', '#f7f8e6', '#e6f8f7', '#f7e6f8', '#f8f7e6'];\r\n return colors[index % colors.length];\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
Welcome to
\r\n
WeCode
\r\n
Your Coding Ally
\r\n \r\n
Start Learning Now\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
How it Works
\r\n
\r\n
\r\n
1. Code
\r\n \"An\r\n
\r\n
\r\n
2. Test
\r\n \"Test\r\n
\r\n
\r\n
3. Ask for help
\r\n \"The\r\n
\r\n
\r\n
4. Repeat & Learn
\r\n \"User\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
Problems\r\n
\r\n\r\n
\r\n {getProblemFolderAsJSX(data?.files || [])}\r\n\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default Home;"],"names":["data","setData","useState","ProblemSection","_ref","index","children","color","getColorForProblemSection","color2","_jsxs","style","background","_jsx","xmlns","viewBox","className","fill","d","colors","length","useEffect","fetch","then","async","response","ok","Error","json","catch","error","console","ScrollLink","to","smooth","duration","src","alt","id","getProblemFolderAsJSX","map","item","meta","title","description","files","Link","problemId","problemName"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/248.7756e353.chunk.js b/static/js/248.7756e353.chunk.js new file mode 100644 index 0000000..b09ac41 --- /dev/null +++ b/static/js/248.7756e353.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[248],{3248:(e,s,i)=>{i.r(s),i.d(s,{default:()=>o});i(5043);var t=i(579);const o=()=>(0,t.jsxs)("div",{className:"max-w-4xl mx-auto p-8",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"Privacy Policy"}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Effective Date:"})," May 18th 2024"]}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"1. Introduction"}),(0,t.jsxs)("p",{className:"",children:['Welcome to We Code ("we", "our", "us"). We are committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our website',(0,t.jsx)("a",{href:"https://wecode.dacubeking.com",className:"text-blue-500",children:" https://wecode.dacubeking.com"}),' ("We Code"). Please read this policy carefully. If you do not agree with the terms of this Privacy Policy, please do not access We Code.']}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"2. Information We Collect"}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"A. GitHub Authentication:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside",children:[(0,t.jsx)("li",{children:"We use GitHub for authentication."}),(0,t.jsx)("li",{children:"Upon logging in, we collect your GitHub ID, name, and username. This information is used to identify and display your profile on We Code."})]}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"B. User Content:"}),(0,t.jsx)("ul",{className:"list-disc list-inside",children:(0,t.jsx)("li",{children:"When you write code for byte-sized coding problems on We Code, your code and test case results are stored locally on your browser's local storage."})}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4 ",children:"C. API Requests:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside",children:[(0,t.jsx)("li",{children:'If you use the "I\'m stuck" feature, the code and test cases you submit are sent to our API. We use this information to call OpenAI or Google Vertex APIs for assistance from an AI tutor.'}),(0,t.jsx)("li",{children:"We also log your user ID and a timestamp for rate-limiting purposes. No other information is saved server-side."})]}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"D. Cloudflare Analytics:"}),(0,t.jsx)("ul",{className:"list-disc list-inside",children:(0,t.jsx)("li",{children:"Our website is proxied through Cloudflare, which collects analytics data. This includes cookies placed by Cloudflare for security and performance purposes. We do not use any other cookies."})}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"3. How We Use Your Information"}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"A. To Provide and Improve Our Services:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside",children:[(0,t.jsx)("li",{children:"Displaying your profile information."}),(0,t.jsx)("li",{children:"Storing your code and test case results in local storage for your convenience."}),(0,t.jsx)("li",{children:"Providing AI-driven assistance when you're stuck."})]}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"B. Security and Analytics:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside",children:[(0,t.jsx)("li",{children:"Enhancing the security and performance of We Code through Cloudflare."}),(0,t.jsx)("li",{children:"Using Cloudflare analytics to understand Site usage and improve our services."})]}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"4. Disclosure of Your Information"}),(0,t.jsx)("p",{className:"",children:"We do not sell, trade, or otherwise transfer your personally identifiable information to outside parties except as described below:"}),(0,t.jsxs)("ul",{className:"list-disc list-inside",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Service Providers:"})," We may share your information with third-party vendors (such as OpenAI and Google Vertex) to perform tasks on our behalf, such as providing AI tutoring services."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Legal Requirements:"})," We may disclose your information if required to do so by law or in response to valid requests by public authorities."]})]}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"5. Data Security"}),(0,t.jsx)("p",{className:"",children:"We use administrative, technical, and physical security measures to protect your personal information. However, no transmission over the Internet or electronic storage is completely secure, so we cannot guarantee its absolute security."}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"6. Your Choices"}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"A. Local Storage:"}),(0,t.jsx)("ul",{className:"list-disc list-inside",children:(0,t.jsx)("li",{children:"You can clear your browser's local storage at any time to delete your code history and test case results."})}),(0,t.jsx)("h3",{className:"text-lg font-semibold mt-4",children:"B. Cookies:"}),(0,t.jsx)("ul",{className:"list-disc list-inside",children:(0,t.jsx)("li",{children:"As we rely on Cloudflare, you can manage Cloudflare's cookies through your browser settings."})}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"7. Changes to This Privacy Policy"}),(0,t.jsx)("p",{className:"",children:'We may update this Privacy Policy from time to time. We will notify you of any changes by updating the "Effective Date" at the top of this Privacy Policy. You are advised to review this Privacy Policy periodically for any changes.'}),(0,t.jsx)("h2",{className:"text-xl font-semibold mt-6",children:"8. Contact Us"}),(0,t.jsxs)("p",{children:["If you have any questions about this Privacy Policy, please contact us at",(0,t.jsx)("a",{href:"mailto:contact@dacubeking.com",className:"text-blue-500",children:" contact@dacubeking.com"}),"."]})]})}}]); +//# sourceMappingURL=248.7756e353.chunk.js.map \ No newline at end of file diff --git a/static/js/248.7756e353.chunk.js.map b/static/js/248.7756e353.chunk.js.map new file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A,KAAA,MAAAD,SAAI,iHAKRC,EAAAA,EAAAA,KAAA,MAAIF,UAAU,6BAA4BC,SAAC,iBAC3CC,EAAAA,EAAAA,KAAA,MAAIF,UAAU,wBAAuBC,UACjCC,EAAAA,EAAAA,KAAA,MAAAD,SAAI,oGAGRC,EAAAA,EAAAA,KAAA,MAAIF,UAAU,6BAA4BC,SAAC,uCAC3CC,EAAAA,EAAAA,KAAA,KAAGF,UAAU,GAAEC,SAAC,4OAMhBC,EAAAA,EAAAA,KAAA,MAAIF,UAAU,6BAA4BC,SAAC,mBAC3CF,EAAAA,EAAAA,MAAA,KAAAE,SAAA,CAAG,6EAECC,EAAAA,EAAAA,KAAA,KAAGC,KAAK,gCAAgCH,UAAU,gBAAeC,SAAC,4BAA2B,S","sources":["footer/Privacy.tsx"],"sourcesContent":["import React from 'react';\r\n\r\nconst PrivacyPolicy = () => {\r\n return (\r\n
\r\n

Privacy Policy

\r\n

Effective Date: May 18th 2024

\r\n\r\n

1. Introduction

\r\n

\r\n Welcome to We Code (\"we\", \"our\", \"us\"). We are committed to protecting your privacy. This Privacy Policy\r\n explains how we collect, use, disclose, and safeguard your information when you use our website\r\n https://wecode.dacubeking.com (\"We Code\"). Please read this policy\r\n carefully. If you do not agree with the terms of this Privacy Policy, please do not access We Code.\r\n

\r\n\r\n

2. Information We Collect

\r\n

A. GitHub Authentication:

\r\n
    \r\n
  • We use GitHub for authentication.
  • \r\n
  • Upon logging in, we collect your GitHub ID, name, and username. This information is used to identify\r\n and display your profile on We Code.\r\n
  • \r\n
\r\n\r\n

B. User Content:

\r\n
    \r\n
  • When you write code for byte-sized coding problems on We Code, your code and test case results are\r\n stored locally on your browser's local storage.\r\n
  • \r\n
\r\n\r\n

C. API Requests:

\r\n
    \r\n
  • If you use the \"I'm stuck\" feature, the code and test cases you submit are sent to our API. We use\r\n this information to call OpenAI or Google Vertex APIs for assistance from an AI tutor.\r\n
  • \r\n
  • We also log your user ID and a timestamp for rate-limiting purposes. No other information is saved\r\n server-side.\r\n
  • \r\n
\r\n\r\n

D. Cloudflare Analytics:

\r\n
    \r\n
  • Our website is proxied through Cloudflare, which collects analytics data. This includes cookies\r\n placed by Cloudflare for security and performance purposes. We do not use any other cookies.\r\n
  • \r\n
\r\n\r\n

3. How We Use Your Information

\r\n

A. To Provide and Improve Our Services:

\r\n
    \r\n
  • Displaying your profile information.
  • \r\n
  • Storing your code and test case results in local storage for your convenience.
  • \r\n
  • Providing AI-driven assistance when you're stuck.
  • \r\n
\r\n\r\n

B. Security and Analytics:

\r\n
    \r\n
  • Enhancing the security and performance of We Code through Cloudflare.
  • \r\n
  • Using Cloudflare analytics to understand Site usage and improve our services.
  • \r\n
\r\n\r\n

4. Disclosure of Your Information

\r\n

We do not sell, trade, or otherwise transfer your personally identifiable information to\r\n outside parties except as described below:

\r\n
    \r\n
  • Service Providers: We may share your information with third-party vendors (such as\r\n OpenAI and Google Vertex) to perform tasks on our behalf, such as providing AI tutoring services.\r\n
  • \r\n
  • Legal Requirements: We may disclose your information if required to do so by law or\r\n in response to valid requests by public authorities.\r\n
  • \r\n
\r\n\r\n

5. Data Security

\r\n

\r\n We use administrative, technical, and physical security measures to protect your personal information.\r\n However, no transmission over the Internet or electronic storage is completely secure, so we cannot\r\n guarantee its absolute security.\r\n

\r\n\r\n

6. Your Choices

\r\n

A. Local Storage:

\r\n
    \r\n
  • You can clear your browser's local storage at any time to delete your code history and test case\r\n results.\r\n
  • \r\n
\r\n\r\n

B. Cookies:

\r\n
    \r\n
  • As we rely on Cloudflare, you can manage Cloudflare's cookies through your browser settings.
  • \r\n
\r\n\r\n

7. Changes to This Privacy Policy

\r\n

\r\n We may update this Privacy Policy from time to time. We will notify you of any changes by updating the\r\n \"Effective Date\" at the top of this Privacy Policy. You are advised to review this Privacy Policy\r\n periodically for any changes.\r\n

\r\n\r\n

8. Contact Us

\r\n

\r\n If you have any questions about this Privacy Policy, please contact us at\r\n contact@dacubeking.com.\r\n

\r\n
\r\n );\r\n};\r\n\r\nexport default PrivacyPolicy;\r\n"],"names":["PrivacyPolicy","_jsxs","className","children","_jsx","href"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/786.7eeccd24.chunk.js b/static/js/786.7eeccd24.chunk.js new file mode 100644 index 0000000..d4cbd6d --- /dev/null +++ b/static/js/786.7eeccd24.chunk.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[786],{4786:(e,s,l)=>{l.r(s),l.d(s,{default:()=>r});var t=l(5043),i=l(5475),a=l(9473);let n="M0,60.56c55.63-30.1,102.12-38.64,133.59-41.06c37.46-2.88,94.56,7.7,207.25,28.99c72.83,13.76,91.25,18.65,123.67,12.56c55.51-10.42,56.68-35.11,104.35-37.2c52.67-2.31,79.26,26.62,124.64,10.63c17.13-6.04,29.35-15.8,36.71-22.71L720,0H0V60.56z";var c=l(579);const r=function(){const[e,s]=(0,t.useState)(null);function l(e){let{index:s,children:l,isLast:t}=e,i=r(s),a=r(s+1);return t&&(a="#1c1f23"),(0,c.jsxs)("div",{style:{background:i},children:[l,(0,c.jsx)("div",{style:{background:a},children:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 72",className:"pb-5",children:(0,c.jsx)("path",{fill:i,d:n})})})]})}function r(e){const s=["#f8e6f7","#e6f7f8","#f7f8e6","#e6f8f7","#f7e6f8","#f8f7e6"];return s[e%s.length]}return(0,t.useEffect)((()=>{fetch("/problem_locations.json").then((async e=>{if(!e.ok)throw new Error("Network response was not ok");return await e.json()})).then((e=>{s(e)})).catch((e=>{console.error("Error loading available problems",e)}))}),[]),(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"flex justify-between h-[calc(100vh*0.60)] bg-white-pink",children:[(0,c.jsx)("div",{className:"flex justify-center items-center",children:(0,c.jsxs)("div",{className:"-mt-16 w-2/3",children:[(0,c.jsx)("div",{className:"text-3xl text-black font-bold",children:"Welcome to"}),(0,c.jsx)("div",{className:"text-9xl font-extrabold text-bright-purple -mt-5",children:"WeCode"}),(0,c.jsx)("div",{className:"text-xl text-black font-semibold mt-5 pl-4",children:"Your Coding Ally"}),(0,c.jsx)(a.N_,{to:"problems",smooth:!0,duration:500,children:(0,c.jsx)("div",{className:"text-xl text-bright-blue underline font-semibold pl-4",children:"Start Learning Now"})})]})}),(0,c.jsx)("div",{className:"flex w-1/3 justify-center items-center",children:(0,c.jsx)("div",{className:" text-black font-bold"})})]}),(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 72",className:"mb-5",children:(0,c.jsx)("path",{fill:"#f8e6f7",d:n})}),(0,c.jsxs)("div",{className:"ml-5 mt-16",children:[(0,c.jsx)("div",{className:"text-5xl font-bold",children:"How it Works"}),(0,c.jsxs)("div",{className:"flex flex-row ml-5 mr-5 ",children:[(0,c.jsxs)("div",{className:"",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"1. Code"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ex-code.png",alt:"An attempt at solving the fibbinachi problem"})]}),(0,c.jsxs)("div",{className:"ml-5",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"2. Test"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ex-test.png",alt:"Test results for the attempt at solving the fibbinachi problem. All but the first two tests failed"})]}),(0,c.jsxs)("div",{className:"ml-5",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"3. Ask for help"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ask-for-help.png",alt:"The AI tutor explaining why the remaining tests failed"})]}),(0,c.jsxs)("div",{className:"ml-5",children:[(0,c.jsx)("div",{className:"text-2xl font-semibold mt-5",children:"4. Repeat & Learn"}),(0,c.jsx)("img",{className:"w-96",src:"/assets/home/ex-repeat.png",alt:"User going back to the problem to fix the issue"})]})]})]}),(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 720 72",className:"pb-5 bg-[#f8e6f7]",children:(0,c.jsx)("path",{fill:"#1C1F23",d:n})}),(0,c.jsx)("div",{id:"problems",className:"text-5xl font-bold pt-8 bg-[#f8e6f7] text-basically-black pl-4 ",children:"Problems"}),(0,c.jsx)("div",{className:"w-full",children:function e(s){return s.map(((t,a)=>{if("directory"in t){let i=a===s.length-1;return(0,c.jsx)(l,{index:a,isLast:i,children:(0,c.jsxs)("div",{className:"pb-5 ml-5 text-basically-black w-1/2",children:[(0,c.jsxs)("div",{className:"text-3xl font-bold",children:[" ",t.meta.title," "]}),(0,c.jsxs)("div",{className:"text-lg",children:[" ",t.meta.description," "]}),(0,c.jsxs)("div",{className:"pl-4",children:[" ",e(t.files)," "]})]})},a)}return(0,c.jsx)("div",{children:(0,c.jsx)(i.N_,{to:"/Problem"+t.problemId,className:"text-bright-blue underline text-lg",children:t.problemName})},a)}))}((null===e||void 0===e?void 0:e.files)||[])})]})}}}]); +//# sourceMappingURL=786.7eeccd24.chunk.js.map \ No newline at end of file diff --git a/static/js/786.7eeccd24.chunk.js.map b/static/js/786.7eeccd24.chunk.js.map new file mode 100644 index 0000000..a508f5a --- /dev/null +++ b/static/js/786.7eeccd24.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"file":"static/js/786.7eeccd24.chunk.js","mappings":"uLAAO,IAAIA,EAAe,gP,aC2J1B,QAtIA,WACI,MAAOC,EAAMC,IAAWC,EAAAA,EAAAA,UAAS,MAyBjC,SAASC,EAAcC,GAAkD,IAAjD,MAACC,EAAK,SAAEC,EAAQ,OAAEC,GAA4BH,EAC9DI,EAAQC,EAA0BJ,GAClCK,EAASD,EAA0BJ,EAAQ,GAI/C,OAHIE,IACAG,EAAS,YAGTC,EAAAA,EAAAA,MAAA,OACIC,MAAO,CAACC,WAAYL,GAAOF,SAAA,CAC1BA,GACDQ,EAAAA,EAAAA,KAAA,OAAKF,MAAO,CAACC,WAAYH,GAAQJ,UAC7BQ,EAAAA,EAAAA,KAAA,OAAKC,MAAM,6BAA6B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MrC,KACnB,GAAI,cAAeqC,EAAM,CACrB,IAAInC,EAASF,IAAUL,EAAKqB,OAAS,EACrC,OACIP,EAAAA,EAAAA,KAACX,EAAc,CAAaE,MAAOA,EAAOE,OAAQA,EAAOD,UACrDK,EAAAA,EAAAA,MAAA,OAAKM,UAAW,uCAAuCX,SAAA,EACnDK,EAAAA,EAAAA,MAAA,OAAKM,UAAU,qBAAoBX,SAAA,CAAC,IAAEoC,EAAKC,KAAKC,MAAM,QACtDjC,EAAAA,EAAAA,MAAA,OAAKM,UAAU,UAASX,SAAA,CAAC,IAAEoC,EAAKC,KAAKE,YAAY,QACjDlC,EAAAA,EAAAA,MAAA,OAAKM,UAAU,OAAMX,SAAA,CAAC,IAAEkC,EAAsBE,EAAKI,OAAO,WAJ7CzC,EAQ7B,CACI,OAAOS,EAAAA,EAAAA,KAAA,OAAAR,UACHQ,EAAAA,EAAAA,KAACiC,EAAAA,GAAI,CAACb,GAAI,WAAaQ,EAAKM,UAAW/B,UAAW,qCAAqCX,SAClFoC,EAAKO,eAFG5C,EAKrB,GAER,CA6DamC,EAA0B,OAAJxC,QAAI,IAAJA,OAAI,EAAJA,EAAM8C,QAAS,QAKtD,C","sources":["shared.tsx","Home.tsx"],"sourcesContent":["export let curveDivider = \"M0,60.56c55.63-30.1,102.12-38.64,133.59-41.06c37.46-2.88,94.56,7.7,207.25,28.99\" +\r\n \"c72.83,13.76,91.25,18.65,123.67,12.56c55.51-10.42,56.68-35.11,104.35-37.2c52.67-2.31,79.26,26.62,124.64,10.63\" +\r\n \"c17.13-6.04,29.35-15.8,36.71-22.71L720,0H0V60.56z\"","import React, {useEffect, useState} from \"react\";\r\nimport {Link} from \"react-router-dom\";\r\nimport {Link as ScrollLink} from 'react-scroll'\r\nimport {curveDivider} from \"./shared\";\r\n\r\nclass ProblemData {\r\n problemName: string = \"\";\r\n problemId: string = \"\";\r\n}\r\n\r\nclass ProblemDirData {\r\n \"directory\": string = \"\";\r\n \"meta\": {\r\n \"displayStyle\": string\r\n \"title\": string\r\n \"description\": string\r\n \"weight\": number\r\n }\r\n \"files\": (ProblemData | ProblemDirData)[]\r\n}\r\n\r\nfunction Home() {\r\n const [data, setData] = useState(null as ProblemDirData | null);\r\n\r\n useEffect(() => {\r\n fetch(process.env.PUBLIC_URL + \"/problem_locations.json\")\r\n .then(async response => {\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok');\r\n }\r\n return await (response.json()) as ProblemDirData\r\n })\r\n .then(data => {\r\n setData(data);\r\n })\r\n .catch(error => {\r\n console.error('Error loading available problems', error);\r\n });\r\n }, []);\r\n\r\n\r\n type ProblemSectionProps = {\r\n index: number;\r\n children: React.ReactNode;\r\n isLast: boolean;\r\n };\r\n\r\n function ProblemSection({index, children, isLast}: ProblemSectionProps) {\r\n let color = getColorForProblemSection(index);\r\n let color2 = getColorForProblemSection(index + 1);\r\n if (isLast) {\r\n color2 = \"#1c1f23\"; // default background color\r\n }\r\n return (\r\n \r\n {children}\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n function getProblemFolderAsJSX(data: (ProblemData | ProblemDirData)[]) {\r\n return data.map((item, index) => {\r\n if ('directory' in item) {\r\n let isLast = index === data.length - 1;\r\n return (\r\n \r\n
\r\n
{item.meta.title}
\r\n
{item.meta.description}
\r\n
{getProblemFolderAsJSX(item.files)}
\r\n
\r\n
\r\n );\r\n } else {\r\n return
\r\n \r\n {item.problemName}\r\n \r\n
\r\n }\r\n });\r\n }\r\n\r\n function getColorForProblemSection(index: number): string {\r\n const colors = ['#f8e6f7', '#e6f7f8', '#f7f8e6', '#e6f8f7', '#f7e6f8', '#f8f7e6'];\r\n return colors[index % colors.length];\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
Welcome to
\r\n
WeCode
\r\n
Your Coding Ally
\r\n \r\n
Start Learning Now\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
How it Works
\r\n
\r\n
\r\n
1. Code
\r\n \"An\r\n
\r\n
\r\n
2. Test
\r\n \"Test\r\n
\r\n
\r\n
3. Ask for help
\r\n \"The\r\n
\r\n
\r\n
4. Repeat & Learn
\r\n \"User\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
Problems\r\n
\r\n\r\n
\r\n {getProblemFolderAsJSX(data?.files || [])}\r\n\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default Home;"],"names":["curveDivider","data","setData","useState","ProblemSection","_ref","index","children","isLast","color","getColorForProblemSection","color2","_jsxs","style","background","_jsx","xmlns","viewBox","className","fill","d","colors","length","useEffect","fetch","then","async","response","ok","Error","json","catch","error","console","ScrollLink","to","smooth","duration","src","alt","id","getProblemFolderAsJSX","map","item","meta","title","description","files","Link","problemId","problemName"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/843.b0a929a7.chunk.js b/static/js/843.55b31125.chunk.js similarity index 87% rename from static/js/843.b0a929a7.chunk.js rename to static/js/843.55b31125.chunk.js index ff68942..453b5de 100644 --- a/static/js/843.b0a929a7.chunk.js +++ b/static/js/843.55b31125.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[843],{3843:(e,o,n)=>{n.r(o),n.d(o,{default:()=>l});var t=n(5475),i=n(5043),c=n(1216),r=n(579);function l(){const[e,o]=(0,t.ok)();return(0,i.useEffect)((()=>{let n=e.get("code");o({}),n&&fetch(c.cG,{method:"POST",headers:{"content-type":"application/json","user-agent":"cloudflare-worker-ai-tutor-login",accept:"application/json"},body:JSON.stringify({code:n})}).then((e=>e.json())).then((e=>{if(e.token){localStorage.setItem("token",e.token);let o=localStorage.getItem("loginRedirect");null!==o&&void 0!==o&&""!==o&&"undefined"!==o?(window.location.href=o,localStorage.setItem("LoginRedirect","")):window.location.href="/"}else console.error(e)})).catch((e=>{console.error(e)}))}),[]),(0,r.jsx)("div",{children:(0,r.jsx)("h1",{children:"Logging in..."})})}}}]); -//# sourceMappingURL=843.b0a929a7.chunk.js.map \ No newline at end of file +"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[843],{3843:(e,o,n)=>{n.r(o),n.d(o,{default:()=>l});var t=n(5475),i=n(5043),c=n(9796),r=n(579);function l(){const[e,o]=(0,t.ok)();return(0,i.useEffect)((()=>{let n=e.get("code");o({}),n&&fetch(c.cG,{method:"POST",headers:{"content-type":"application/json","user-agent":"cloudflare-worker-ai-tutor-login",accept:"application/json"},body:JSON.stringify({code:n})}).then((e=>e.json())).then((e=>{if(e.token){localStorage.setItem("token",e.token);let o=localStorage.getItem("loginRedirect");null!==o&&void 0!==o&&""!==o&&"undefined"!==o?(window.location.href=o,localStorage.setItem("LoginRedirect","")):window.location.href="/"}else console.error(e)})).catch((e=>{console.error(e)}))}),[]),(0,r.jsx)("div",{children:(0,r.jsx)("h1",{children:"Logging in..."})})}}}]); +//# sourceMappingURL=843.55b31125.chunk.js.map \ No newline at end of file diff --git a/static/js/843.b0a929a7.chunk.js.map b/static/js/843.55b31125.chunk.js.map similarity index 97% rename from static/js/843.b0a929a7.chunk.js.map rename to static/js/843.55b31125.chunk.js.map index 631b084..019dceb 100644 --- a/static/js/843.b0a929a7.chunk.js.map +++ b/static/js/843.55b31125.chunk.js.map @@ -1 +1 @@ -{"version":3,"file":"static/js/843.b0a929a7.chunk.js","mappings":"gMAIe,SAASA,IACpB,MAAOC,EAAcC,IAAmBC,EAAAA,EAAAA,MAuCxC,OAtCAC,EAAAA,EAAAA,YAAU,KACN,IAAIC,EAAOJ,EAAaK,IAAI,QAC5BJ,EAAgB,CAAC,GACbG,GACAE,MAAMC,EAAAA,GAAc,CAChBC,OAAQ,OACRC,QAAS,CACL,eAAgB,mBAChB,aAAc,mCACdC,OAAQ,oBAEZC,KAAMC,KAAKC,UAAU,CAACT,WAErBU,MAAKC,GAAYA,EAASC,SAC1BF,MAAKG,IACF,GAAIA,EAAOC,MAAO,CACdC,aAAaC,QAAQ,QAASH,EAAOC,OACrC,IAAIG,EAAgBF,aAAaG,QAAQ,iBAEnB,OAAlBD,QAA4CE,IAAlBF,GAAiD,KAAlBA,GAA0C,cAAlBA,GACjFG,OAAOC,SAASC,KAAOL,EACvBF,aAAaC,QAAQ,gBAAiB,KAEtCI,OAAOC,SAASC,KAAO,GAE/B,MACIC,QAAQC,MAAMX,EAClB,IAGHY,OAAMD,IACHD,QAAQC,MAAMA,EAAM,GAEhC,GAED,KAICE,EAAAA,EAAAA,KAAA,OAAAC,UACID,EAAAA,EAAAA,KAAA,MAAAC,SAAI,mBAGhB,C","sources":["auth/LoginSuccess.tsx"],"sourcesContent":["import {useSearchParams} from \"react-router-dom\";\r\nimport {useEffect} from \"react\";\r\nimport {AUTH_API_URL} from \"../App\";\r\n\r\nexport default function LoginSuccess() {\r\n const [searchParams, setSearchParams] = useSearchParams();\r\n useEffect(() => {\r\n let code = searchParams.get(\"code\");\r\n setSearchParams({});\r\n if (code) {\r\n fetch(AUTH_API_URL, {\r\n method: \"POST\",\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n \"user-agent\": \"cloudflare-worker-ai-tutor-login\",\r\n accept: \"application/json\",\r\n },\r\n body: JSON.stringify({code})\r\n })\r\n .then(response => response.json())\r\n .then(result => {\r\n if (result.token) {\r\n localStorage.setItem(\"token\", result.token);\r\n let loginRedirect = localStorage.getItem(\"loginRedirect\");\r\n\r\n if (loginRedirect !== null && loginRedirect !== undefined && loginRedirect !== \"\" && loginRedirect !== \"undefined\") {\r\n window.location.href = loginRedirect;\r\n localStorage.setItem(\"LoginRedirect\", \"\");\r\n } else {\r\n window.location.href = \"/\";\r\n }\r\n } else {\r\n console.error(result);\r\n }\r\n\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n });\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n\r\n return (\r\n
\r\n

Logging in...

\r\n
\r\n )\r\n}"],"names":["LoginSuccess","searchParams","setSearchParams","useSearchParams","useEffect","code","get","fetch","AUTH_API_URL","method","headers","accept","body","JSON","stringify","then","response","json","result","token","localStorage","setItem","loginRedirect","getItem","undefined","window","location","href","console","error","catch","_jsx","children"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"static/js/843.55b31125.chunk.js","mappings":"gMAIe,SAASA,IACpB,MAAOC,EAAcC,IAAmBC,EAAAA,EAAAA,MAuCxC,OAtCAC,EAAAA,EAAAA,YAAU,KACN,IAAIC,EAAOJ,EAAaK,IAAI,QAC5BJ,EAAgB,CAAC,GACbG,GACAE,MAAMC,EAAAA,GAAc,CAChBC,OAAQ,OACRC,QAAS,CACL,eAAgB,mBAChB,aAAc,mCACdC,OAAQ,oBAEZC,KAAMC,KAAKC,UAAU,CAACT,WAErBU,MAAKC,GAAYA,EAASC,SAC1BF,MAAKG,IACF,GAAIA,EAAOC,MAAO,CACdC,aAAaC,QAAQ,QAASH,EAAOC,OACrC,IAAIG,EAAgBF,aAAaG,QAAQ,iBAEnB,OAAlBD,QAA4CE,IAAlBF,GAAiD,KAAlBA,GAA0C,cAAlBA,GACjFG,OAAOC,SAASC,KAAOL,EACvBF,aAAaC,QAAQ,gBAAiB,KAEtCI,OAAOC,SAASC,KAAO,GAE/B,MACIC,QAAQC,MAAMX,EAClB,IAGHY,OAAMD,IACHD,QAAQC,MAAMA,EAAM,GAEhC,GAED,KAICE,EAAAA,EAAAA,KAAA,OAAAC,UACID,EAAAA,EAAAA,KAAA,MAAAC,SAAI,mBAGhB,C","sources":["auth/LoginSuccess.tsx"],"sourcesContent":["import {useSearchParams} from \"react-router-dom\";\r\nimport {useEffect} from \"react\";\r\nimport {AUTH_API_URL} from \"../App\";\r\n\r\nexport default function LoginSuccess() {\r\n const [searchParams, setSearchParams] = useSearchParams();\r\n useEffect(() => {\r\n let code = searchParams.get(\"code\");\r\n setSearchParams({});\r\n if (code) {\r\n fetch(AUTH_API_URL, {\r\n method: \"POST\",\r\n headers: {\r\n \"content-type\": \"application/json\",\r\n \"user-agent\": \"cloudflare-worker-ai-tutor-login\",\r\n accept: \"application/json\",\r\n },\r\n body: JSON.stringify({code})\r\n })\r\n .then(response => response.json())\r\n .then(result => {\r\n if (result.token) {\r\n localStorage.setItem(\"token\", result.token);\r\n let loginRedirect = localStorage.getItem(\"loginRedirect\");\r\n\r\n if (loginRedirect !== null && loginRedirect !== undefined && loginRedirect !== \"\" && loginRedirect !== \"undefined\") {\r\n window.location.href = loginRedirect;\r\n localStorage.setItem(\"LoginRedirect\", \"\");\r\n } else {\r\n window.location.href = \"/\";\r\n }\r\n } else {\r\n console.error(result);\r\n }\r\n\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n });\r\n }\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n\r\n return (\r\n
\r\n

Logging in...

\r\n
\r\n )\r\n}"],"names":["LoginSuccess","searchParams","setSearchParams","useSearchParams","useEffect","code","get","fetch","AUTH_API_URL","method","headers","accept","body","JSON","stringify","then","response","json","result","token","localStorage","setItem","loginRedirect","getItem","undefined","window","location","href","console","error","catch","_jsx","children"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/853.f8edb0ba.chunk.js b/static/js/853.4c6c25ca.chunk.js similarity index 99% rename from static/js/853.f8edb0ba.chunk.js rename to static/js/853.4c6c25ca.chunk.js index 4f2b0f5..e78db6d 100644 --- a/static/js/853.f8edb0ba.chunk.js +++ b/static/js/853.4c6c25ca.chunk.js @@ -1,2 +1,2 @@ -"use strict";(self.webpackChunkai_coding_learning=self.webpackChunkai_coding_learning||[]).push([[853],{1234:(e,t,n)=>{n.r(t),n.d(t,{UserData:()=>J,default:()=>z,marked:()=>W,saveUserData:()=>B});var s=n(4283),r=n(8857),o=n(8172),l=n(5043),i=n(6213),a=n.n(i),u=n(5745),c=n(5969),h=n(2518),d=n(1216);class p{constructor(){this.id="",this.title="Loading...",this.preProblemDescription="",this.description="",this.tests=[],this.hiddenTests=[],this.displayAbove="",this.displayBelow="",this.solution="",this.solutionCode="",this.codeLang="",this.nextProblemId=""}}class g{constructor(e,t){this.key=void 0,this.value=void 0,this.key=e,this.value=t}}function f(e,t){for(;e.length>0&&(v(e),0!==e.length&&"code"===e[0].type);){let n=e.shift().text.trim(),s=n.split("\n").flatMap((e=>e.trim())),r=s[s.length-1],o=r.indexOf("("),l=-1;for(let e=r.length-1;e>=0;e--)if(")"===r[e]){l=e;break}if(-1===o||-1===l){console.error("Failed to parse function call (Magic Links will not work!): "+r);continue}let i=r.substring(o+1,l).split(",").map((e=>e.trim()));v(e);let a=1,u=r;u.endsWith(";")&&(u=u.substring(0,u.length-1));let c=[];for(let e of i){let t=n.match(new RegExp("let\\s+".concat(e,"\\s*=\\s*")));if(null!==t&&void 0!==t.index){let s=n.substring(t.index+t[0].length).trim(),r=0,o=0,l=0,i=0,a=0;for(let e=0;e0&&"paragraph"===e[0].type;){let t=e.shift().text.trim(),n=t.split("=").map((e=>e.trim()));if(2!==n.length){console.error("Failed to parse metadata: "+t);continue}let s=n[0].toLowerCase(),o=n[1];if("repeat"===s){let e=parseInt(o);isNaN(e)?console.error("Failed to parse repeat value: "+o):a=e}else if("displayas"===s){u=o;let e=r.indexOf("("),t=-1;for(let n=u.length-1;n>=0;n--)if(")"===u[n]){t=n;break}if(-1===e||-1===t){console.error("Failed to parse function for displayAs meta call (Magic Links will not work!): "+u);continue}i=u.substring(e+1,t).split(",").map((e=>e.trim()))}else if(i.includes(n[0])){let t=n[0],s=n[1];0===n[1].length&&(v(e),0===e.length||"code"!==e[0].type?console.error("Found magic link with nothing after the equals sign & no code block following: "+n[0]):s=e.shift().text),m(c,t,s)}else console.error("Unknown metadata key: "+n[0]);v(e)}for(let e=0;e0&&e[0].type!==t;)e.shift()}function v(e){for(;e.length>0&&"space"===e[0].type;)e.shift()}var y=n(579);const w="Requesting help from the AI tutor...",R="NEXT_HELP_TIME";var k=n(3216),E=(n(119),n(6494)),C=n(2561);const j=2;let N=function(e){return e.Passed="Passed",e.Failed="Failed",e.Exception="Exception",e.NotRun="Not run",e}({});class S{constructor(){this.testResults=[],this.returnedResults=[],this.expectedResults=[],this.parseError="",this.errorLine=-1,this.runtimeError="",this.outputs=[],this.ranSuccessfully=!0}}class L{constructor(e,t){this.str=void 0,this.lineNum=void 0,this.str=e,this.lineNum=t}}const P=n(5311).A;function A(e){let t=[],n=1;const s=[" ","(",")","{","}",":",",",";","\n"];let r=0;for(let o=0;o""!==e.str))}function I(e,t,n,s){let r=e.stack;void 0===r&&(r="");let o=r.split("\n");for(let a=0;a:/g;for(let a=0;a=t[e]&&l<=n[e]){u=t[e],c=n[e];break}if(-1!==u&&-1!==c){let t=l-u+1,n=0;for(let e=0;es[e]&&n++;t-=n;let c=parseInt(r[2]),h="".concat(t,":").concat(c);o[a]=e.replace(r[0],h),-1===i&&(i=t)}}}return e.stack=o.join("\n"),i}function T(e){return void 0===e?"undefined":null===e?"null":e.toString()}function F(){return Math.random().toString(36).substring(7)}function M(e){let t=e.solutionCode,n="expectedResults"+F(),s="\nlet ".concat(n," = [] || [];\n \n").concat(t,"\n "),r=e.tests.concat(e.hiddenTests);for(let i=0;iT(e)))}const D=(e,t)=>{if(!e.length)return t.length;if(!t.length)return e.length;const n=[];for(let s=0;s<=t.length;s++){n[s]=[s];for(let r=1;r<=e.length;r++)n[s][r]=0===s?r:Math.min(n[s-1][r]+1,n[s][r-1]+1,n[s-1][r-1]+(e[r-1]===t[s-1]?0:1))}return n[t.length][e.length]};var _=n(1020),H=n(34);o.A.registerAliases([""],{languageName:"javascript"});const U=(0,l.lazy)((()=>Promise.all([n.e(671),n.e(303)]).then(n.bind(n,4303)))),W=new s.Dz((0,r.x)({langPrefix:"hljs language-",highlight(e,t,n){const s=o.A.getLanguage(t)?t:"plaintext";return o.A.highlight(e,{language:s}).value}}));function B(e,t){null!==t.currentCode&&""!==t.currentCode&&void 0!==t.currentCode||console.error("User data is being saved with no code"),localStorage.setItem(O(e.id,(0,u.J3)()),JSON.stringify(t))}function O(e,t){return"problem "+e}function z(){var e,t,n;const[s,r]=(0,l.useState)(null),{"*":i}=(0,k.g)(),[g,m]=(0,l.useState)(null),[j,L]=(0,l.useState)('When you press "I\'m stuck", the AI tutor will respond here.'),[H,z]=(0,l.useState)({anchorEl:null,magicLink:"",highlight:!0});function G(){return function(e,t,n){if(0===t.history.length)t.history.push(t.currentCode);else{t.history[t.history.length-1]!==t.currentCode&&t.history.push(t.currentCode)}t.lastUpdated=new Date;let s=function(e,t){let n,s=e.currentCode;try{n=C.qg(s,{ecmaVersion:"latest",locations:!0})}catch(v){if(v instanceof SyntaxError){let e=v.message;return v.pos===s.length&&(e+="\nUnexpected end of input. Check that you have closed all brackets and parentheses."),{testResults:[],returnedResults:[],expectedResults:M(t),parseError:e,errorLine:v.loc.line,runtimeError:"",outputs:[],ranSuccessfully:!1}}throw v}{let e={returnableError:{testResults:[],returnedResults:[],expectedResults:M(t),parseError:"You need to define a function with the following signature:"+t.solutionCode.split("{")[0],errorLine:1,runtimeError:"",outputs:[],ranSuccessfully:!1},matchedTokens:0,levenshteinDistance:1e5},r=!1;e:for(let o of n.body){let n=s.substring(o.start,o.end).split("{")[0],l=A(n),i=t.solutionCode.split("{")[0],a=A(i);for(let s=0;se.str)).join(" ")+"` but got: `"+l[s].str+"`.";let r=D(l[s].str,a[s].str);(s>e.matchedTokens||r=e.matchedTokens)&&(e={returnableError:{testResults:[],returnedResults:[],expectedResults:M(t),parseError:n,errorLine:l[s].lineNum,runtimeError:"",outputs:[],ranSuccessfully:!1},matchedTokens:s,levenshteinDistance:r});continue e}if(l.length===a.length){r=!0;break}l.length>e.matchedTokens&&(e={returnableError:{testResults:[],returnedResults:[],expectedResults:M(t),parseError:"Function signature does not match the expected signature. Expected: "+i+" but got: "+n,errorLine:l[l.length-1].lineNum,runtimeError:"",outputs:[],ranSuccessfully:!1},matchedTokens:l.length,levenshteinDistance:1e5})}if(!r)return e.returnableError}function r(e,t){let n=1;for(let s=t;s 10000) { throw new Error("Infinite loop detected. Execution stopped."); }\n');s=r+h+n+d+i,o.push(a),o.push(u);let p=h.length+d.length;for(let s=y+1;s=m.length){b.testResults.push(N.NotRun),b.expectedResults.push("Unknown"),b.returnedResults.push("Unknown"),b.outputs.push([]),b.ranSuccessfully=!1;continue}if(y>=f.length){b.testResults.push(N.NotRun),b.expectedResults.push(m[y].toString()),b.returnedResults.push("Unknown"),b.outputs.push([]),b.ranSuccessfully=!1;continue}let e,n=f[y],r=m[y];if(e=y>t.tests.length?[]:x[y],r instanceof Error){b.expectedResults.push("Error"),b.returnedResults.push("Error"),b.testResults.push(N.NotRun),console.error("A test case failed to run the solution: "+r),console.log("Test: "+g[y]),console.log("Solution: "+t.solutionCode),console.log("User code: "+s),b.ranSuccessfully=!1;continue}b.expectedResults.push(T(r));let l=[];for(let t of e){let e="";"log"!==t.function&&(e=t.function+": ");for(let n of t.args)n instanceof Error&&I(n,d,p,o);t.args.length>0?e+=E.format(t.args[0],...t.args.slice(1)):e+="",l.push(e)}b.outputs.push(l),n instanceof Error?(b.returnedResults.push("Error"),b.testResults.push(N.Exception),b.errorLine=I(n,d,p,o),b.runtimeError=n.stack,b.ranSuccessfully=!1):(b.returnedResults.push(T(n)),T(n)!==T(r)?b.testResults.push(N.Failed):b.testResults.push(N.Passed))}return b}(t,e),r=new J(t.history,t.requestHelpHistory,s,new Date,t.currentCode,t.aiRememberResponse);return n(r),B(e,r),r}(s,g,m)}let X=null===i||void 0===i?void 0:i.toLowerCase();if(null===(e=X)||void 0===e||e.trim(),null!==(t=X)&&void 0!==t&&t.startsWith("/")&&(X=X.substring(1)),null!==(n=X)&&void 0!==n&&n.endsWith("/")&&(X=X.substring(0,X.length-1)),(0,l.useEffect)((()=>{void 0!==X&&fetch("/problems/"+X+".md").then((async e=>{let t=await e.text();if(e.ok&&t.startsWith("#"))return t;throw new Error("Failed to fetch problem data")})).then((async e=>{let t=function(e,t){let n=W.lexer(e),s=n.shift().text,r="";if(b(n,"heading"),"Context"===n[0].text)for(n.shift();n.length>0&&("heading"!==n[0].type||n[0].depth>1);)r+=n.shift().raw;x(n,"description");let o="";for(;n.length>0&&("heading"!==n[0].type||n[0].depth>1);)o+=n.shift().raw;x(n,"Problem"),"code"!==n[0].type&&console.error("Problem Parse: No code block found after problem heading. If no template code is needed, please use a code block with no content (with the correct language).");let l=n.shift();l.lang||console.error("Problem Parse: No code language specified for problem "+t);let i,a,u=l.lang?l.lang:"javascript",c=l.text.split("// Your code here");0===c.length||""===c[0].trim()?(console.log("Problem Parse: Code block has no content"),i="",a=""):(i=c[0].trim(),1===c.length?(a="",console.error("Problem Parse: No secondary display content found in problem "+t+". It is unlikely that this is intentional. Ensure that you have a comment with the text '// Your code here' in the problem description.")):a=c[1].trim()),x(n,"Solution"),v(n);let h="",d="";for(;n.length>0&&!("heading"===n[0].type&&n[0].depth<=1);)"code"===n[0].type&&""===d&&(d+=n[0].text),h+=n.shift().raw;x(n,"Test Cases");let p=[];f(n,p),x(n,"Hidden Test Cases");let g,m=[];return f(n,m),x(n,"Next"),0===n.length||"paragraph"!==n[0].type?g="nothing":(g=n.shift().text,g=g.trim(),g.startsWith("/")&&(g=g.substring(1)),g.endsWith("/")&&(g=g.substring(0,g.length-1)),""===g&&(g="nothing")),{id:t,title:s,preProblemDescription:r,description:o,tests:p,hiddenTests:m,displayAbove:i,displayBelow:a,solution:h,solutionCode:d,codeLang:u,nextProblemId:g}}(e,X),n=function(e,t){if(void 0===e)return console.error("No problem id was specified, so no user data could be retrieved."),new J;let n=localStorage.getItem(O(e));null===n&&(n=localStorage.getItem(O(e)),null!==n&&console.log("Got user data without username"));if(null===n)return new J;return JSON.parse(n)}(X,(0,u.J3)());null!==n.currentCode&&""!==n.currentCode&&void 0!==n.currentCode||(console.log("First time loading problem, setting template data"),""!==t.displayAbove&&""!==t.displayBelow&&(n.currentCode=t.displayAbove+"\n\t\n"+t.displayBelow)),void 0!==n.testResults&&null!==n.testResults&&0!==n.testResults.expectedResults.length||(console.log("First time loading problem, getting expected results"),n.testResults=new S,n.testResults.expectedResults=M(t)),r(t),m(n)})).catch((e=>{console.error(e);let t=new p;t.title="Failed to load problem "+X,r(t)}))}),[X]),null===s||null===g)return null!=s&&void 0!==s.title&&s.title.startsWith("Failed to load problem")&&void 0!==X?(0,y.jsxs)("div",{children:["Failed to load problem ",X]}):void 0!==X?(0,y.jsx)("div",{children:"Loading..."}):(0,y.jsx)("div",{children:"A problem wasn't specified"});let K=s.codeLang;""===K&&(K="plaintext");let Q=a().sanitize(W.parse(s.preProblemDescription+"\n\n"+s.description));const Z=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];z({anchorEl:e.currentTarget,magicLink:t,highlight:n})},$=()=>{z({anchorEl:null,magicLink:H.magicLink,highlight:H.highlight})},ee=Boolean(H.anchorEl);let te=[];for(let o=0;o0&&(se=(0,y.jsx)("ul",{className:"",children:te.map(((e,t)=>(0,y.jsx)("li",{children:e},t)))})),0===g.testResults.testResults.length)ne="Hidden tests will be run when you submit your code";else{let e=s.hiddenTests.length,t=0;for(let n=0;n