Skip to content

Instantly share code, notes, and snippets.

@CodeNextPaco
CodeNextPaco / zombie_manor_demo
Created June 23, 2022 08:23
A version of Zombie manor with zombies
#This is the starter file for zombie_manor.py
#Use it to develop your skills as needed
import random
input_msg ="" #an empty string to hold our user inputs
game_is_on = True #the game loop will depend on this being true
current_room = None #to keep track of where we are
rooms = [] #append any new rooms you create to this list
@CodeNextPaco
CodeNextPaco / ViewController.swift
Created January 17, 2022 19:46
Project 3 view controller - code next iOS club
import UIKit
class ViewController: UICollectionViewController, UIImagePickerControllerDelegate & UINavigationControllerDelegate {
var people = [Person]()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
@CodeNextPaco
CodeNextPaco / ViewController.swift
Created January 16, 2022 04:21
Flag Project 2 View Controller
import UIKit
class ViewController: UIViewController {
@IBOutlet var button1: UIButton!
@IBOutlet var button2: UIButton!
@IBOutlet var button3: UIButton!
var countries = [String]()
@CodeNextPaco
CodeNextPaco / DetailViewController.swift
Created December 29, 2021 19:27
Project 1 detail view controller
import UIKit
class DetailViewController: UIViewController {
@IBOutlet var imageView: UIImageView!
var selectedImage:String!
override func viewDidLoad() {
super.viewDidLoad()
@CodeNextPaco
CodeNextPaco / ViewController.swift
Last active December 27, 2021 23:43
Project1 ViewController (TableViewController)
import UIKit
class ViewController: UITableViewController {
var pictures = [String]() //empty array of Strings to hold our image file names.
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
from gpiozero import Servo, AngularServo
from time import sleep
#servo = Servo(21)
servo = AngularServo(21, min_angle=0, max_angle=180, min_pulse_width=0.0006, max_pulse_width=0.0024)
while True:
"""
num = input("Enter a number between -1 and 1")
num = float(num)
if num <= 1 and num >= -1:
@CodeNextPaco
CodeNextPaco / distance-led.py
Last active October 18, 2021 22:06
GPIO Zero distance LED blink
from gpiozero import LED, DistanceSensor
from time import sleep
# DisanceSensor(echo, trigger)
sensor = DistanceSensor(26, 20)
led = LED(14)
blink_rate = 0
def blink(d):
if d < 1.0:
/**************************
Zombie Manor: a Choose Your Own Adventure game prototype
Made by Google's Code Next Team Edge Program
Demoing:
- Game while loops
- Boolean logic
- Object Oriented Programming
- Functions
- Random numbers
//This is the starter file for zombie_manor.js
//Use it to develop your skills as needed
const READLINE = require("readline-sync")
let inputMsg ="" //an empty string to hold our user inputs
let gameIsOn = true //the game loop will depend on this being true
let currentRoom = null //to keep track of where we are
let rooms = [] //push any new rooms you create to this array
@CodeNextPaco
CodeNextPaco / superheros.js
Last active April 19, 2020 18:18
superheroes.js
/********************************************************************
*
* Team Edge objects: SUPERHERO CHALLENGES
*
* In this challenge you are going to modify this code to do the
* the following below. Before you begin, walkthrough the code
* with your coaches.
*
* 1. Change both superhero and nemesis using same class.