Skip to content

Instantly share code, notes, and snippets.

View sunnyeyez123's full-sized avatar

Jasmine Lawrence sunnyeyez123

View GitHub Profile
@sunnyeyez123
sunnyeyez123 / YesNo_ExternalRequest.js
Created November 21, 2019 07:42
Triggering a Misty Skill using the bump sensors
misty.Debug("Starting my skill");
let yesnoURL = "https://yesno.wtf/api"
// Parse the response data to get the current condition in _params.city
// and print this in a string to the dev console in the Skill Runner
// web page.
function _SendExternalRequest(data) {
@sunnyeyez123
sunnyeyez123 / rock_paper_scissors.js
Created March 27, 2019 04:37
A classic game of Rock, Paper Scissors with a Secret Twist
const getUserChoice = userInput =>{
userInput = userInput.toLowerCase();
if(userInput === 'rock' || userInput === 'paper' || userInput === 'scissors' ||userInput === 'bomb' ){
return userInput;
}else{
console.log('Please enter rock, paper or scissors');
}
};
const getComputerChoice =()=> {
@sunnyeyez123
sunnyeyez123 / Library.java
Created November 10, 2017 02:41
A simple Library tool to help analyze completed books in a small, personal library
/* a simple Library tool to help analyze completed books in a small, personal library
*/
import java.util.HashMap;
public class Library{
public Library(){
}
@sunnyeyez123
sunnyeyez123 / GradeAnalyzer.java
Created November 9, 2017 21:30
A simple tool to help analyze classroom grades stored in an ArrayList. At the analyzer is able to retrieve the classroom average.
/*
A simple tool to help analyze classroom grades stored in an ArrayList. At the analyzer is able to retrieve the classroom average.
*/
import java.util.ArrayList;
public class GradeAnalyzer{
public GradeAnalyzer(){
@sunnyeyez123
sunnyeyez123 / Droid.java
Created November 9, 2017 06:42
A simple Droid (robot) that can be activated, charged, and hover above ground.
/* A simple Droid (robot) that can be activated, charged, and hover above ground.*/
public class Droid{
int batteryLevel;
public Droid(){
batteryLevel =100;
}
public void activate(){
System.out.println("Activated. How can I help you?");
/* a simple arithmetic calculator. */
class Calculator{
public Calculator(){
}
public int add(int a, int b){
@sunnyeyez123
sunnyeyez123 / CarLoan.py
Created November 9, 2017 05:25
A program that will calculate the monthly car payment a user should expect to make after taking out a car loan
'''a program that will calculate the monthly car payment a user should expect
to make after taking out a car loan*/ '''
def CarLoan():
car_loan = 10000
loan_length = 3
interest_rate = 5
down_payment =2000
@sunnyeyez123
sunnyeyez123 / CarLoan.java
Created November 9, 2017 05:19
A program that will calculate the monthly car payment a user should expect to make after taking out a car loan
/*a program that will calculate the monthly car payment a user should expect to make after taking out a car loan*/
public class CarLoan {
public static void main(String[] args) {
int carLoan = 10000;
int loanLength = 3;
int interestRate = 5;
int downPayment = 2000;
@sunnyeyez123
sunnyeyez123 / Continents.java
Created November 8, 2017 08:11
print out a continent and the largest city in that continent, based on the value of an integer.
/* print out a continent and the largest city in that continent, based on the value of an integer. */
public class Continents {
public static void main(String[] args) {
int continent =4;
switch(continent){
case 1:
System.out.println("North America: Mexico City, Mexico");
break;
@sunnyeyez123
sunnyeyez123 / bankaccount.py
Last active November 2, 2017 06:49
This wasn't that tricky. I think I will modify this behave more like an ATM than just an account. It will allow the user to interact and specify withdraw/deposit amounts. I will also require a pin for their account. I can make it so different users can store their pins.
''' A bank account experience that allows you to view the balance of, deposit to and withdraw from your account'''
class BankAccount(object):
balance = 0
def __init__(self,name):
self.name = name
def __repr__(self):
return "%s's account. Balanace: %.2f" %(self.name, self.balance)