Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Assignments/Answers/Assignment 0- Git Basics Answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1. git clone
2. P33P33H33H33
3. done and done chief
4. done
5. done
6. Homework 0 is done, hooraay \o/
32 changes: 32 additions & 0 deletions Assignments/Answers/Assignment 1 Responses/Question 1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
X= (User Input 1) cookies
Y= (User Input 2) cookies
z=0
w=-1

while w<0;
If x>=0 and y>=0;
Z= the total number of cookies ;
Return Z;
Print "I can math";
w=1;

If x<0 or y<0;
Z= the total number of cookies;
if z>=0;
return z;

else;
return "You owe somebody cookies";

Print "Don't be negative"
w=1;

Else;
Print "Please input a number";

end;
end;

\\ The idea here is to create an algorithm that can be prompted for basic addition, and will
\\ return for the user a little joke if it detects a negative number operation. The algorithm will also
\\ prompt the user to reinput their values if it detects the user has input anything other than a number.
26 changes: 26 additions & 0 deletions Assignments/Answers/Assignment 1 Responses/Question 2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Class Data type structure
ATK=int
DEF=int
EVASION=int
IsWestern=Bool
IsEastern=Bool
TAUNT=String

Pirate Class
ATK=2
DEF=3
EVASION=1
IsWestern=T
IsEastern=F
TAUNT= "YAAARGH"

Ninja Class
ATK=1
DEF=2
EVASION=3
IsWestern=F
IsEastern=T
TAUNT= "..."

\\ I have derrived both Pirate and Ninja from the "Class" data type with arbitrary values assigned,
\\ As they are both sharing the same "Class" data type, they differ only in the values attributed to it.
14 changes: 14 additions & 0 deletions Assignments/Answers/Assignment 1 Responses/Question 3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Banana Data Type:
Array of 6
Color=Yellow
Size=Small
Flavor=delicious
Nutrition=Potassium;


BannanaTree Data Type:
Contains array of X bannanas,
X= any whole integer between 3 and 4
Size=Large
Flavor=Inedible
Nutrition=none;
16 changes: 16 additions & 0 deletions Assignments/Answers/Assignment 1 Responses/Question 6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
D1= Current Date in days
D2= User input date in days

if D1>D2;
then return (365-D1)+D2

else
return D2-D1;

\\\Without built in date calculation functions, I am not sure if there is a way to write this algorithm
automatically without manually inputting which months have 31 or 30 days. My solution can be
imprecise and does not account for leap years.

\\\If I am required to have the user input their birthday in the month/year format, then we would
need to declare the range of days for each month, verify at the start of the algorithm whether or not
it is a leap year, and then convert the months to days using the date compiled from the second step.
11 changes: 11 additions & 0 deletions Assignments/Answers/Assignment 1 Responses/Question 7.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
x=userinput Celsius temp
y=userinput Farenheit temp

xa=Farenheit conversion
ya=Celsius conversion

xa=(x*9/5)+32

ya=(y-32)*5/9


6 changes: 6 additions & 0 deletions Assignments/Answers/Assignment 1 Responses/Questions 4, 5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
4. A compiled language is technically run in a smaller amount of steps due to it directly translating the language into machine code, meaning it will run faster than an interpreted language and consume less processing real-estate, but it also means it is less flexible or user friendly. An interpreted language has a middle man of sorts that allows for on the fly alterations and easier debugging, but will run slower due to needing to then translate the user-friendly language into machine code.

Their uses may vary, but generally, for a simple process that won't need to be changed very often, it would be more useful to use a compiled language. If there is a more complex script that may require many moving parts or multiple users to work on, an interpreted language would help to catch mistakes early on and to support a non-destructive workflow.


5. All three codes are in fact the same, or if not, contain the same inherent code. Source code is written using a human-readable language and is the direct set of instructions given to fulfill a function or process. Assembly code is the lowest level of program description possible before reaching machine code. The Assembly code will inform the machine code, which is the actual code that the machine is able to read and understand (bytes and bits of 1's and 0's), and explain to the machine in which direction goes which set of data into whatever stored memory may be required.
4 changes: 3 additions & 1 deletion Assignments/Assignment 0 - Git Basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ Keep track of any git commands that you use to do these tasks, and put them into
3. Create a new repo under your own GitHub account with the name "CS4G". Send me the link on Discord.
4. Now fork the repo you cloned in (1). Create a pull request to my repo that adds your name to the bottom of this file.
5. Create a new branch of the repo from (4) and push it to your fork as a separate branch from main/master.
6. Commit your responses to this assignment into your repo from the question 3 as a single file. The filename should contain "Git Basics" in some form.
6. Commit your responses to this assignment into your repo from the question 3 as a single file. The filename should contain "Git Basics" in some form.

Rick
1 change: 1 addition & 0 deletions Assignments/Semester Project Ideas.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CSP to Blender plugin to better translate vectors and avoid using blender's god awful draw app