This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UICollectionViewController, UIImagePickerControllerDelegate & UINavigationControllerDelegate { | |
var people = [Person]() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet var button1: UIButton! | |
@IBOutlet var button2: UIButton! | |
@IBOutlet var button3: UIButton! | |
var countries = [String]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class DetailViewController: UIViewController { | |
@IBOutlet var imageView: UIImageView! | |
var selectedImage:String! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************** | |
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************** | |
* | |
* 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. |
NewerOlder