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 / Divisors.py
Created November 2, 2017 06:00
Create a program that asks the user for a number and then prints out a list of all the divisors of that number.
'''Create a program that asks the user for a number and then prints out a list
of all the divisors of that number. (If you don’t know what a divisor is, it
is a number that divides evenly into another number. For example, 13 is a
divisor of 26 because 26 / 13 has no remainder.)
Source:http://www.practicepython.org/exercise/2014/02/26/04-divisors.html
'''
num = int(raw_input("Enter a number: "))