Skip to content

Instantly share code, notes, and snippets.

View angelabauer's full-sized avatar

Angela Yu angelabauer

View GitHub Profile
@angelabauer
angelabauer / sheety.py
Created April 13, 2023 10:50
Solution for sheety.py for the Flight Club project
import requests
import os
BEARER = os.getenv("API_Bearer_Sheety_Repl.it")
USERNAME = os.getenv("API_Username_Sheety")
PROJECT = "flightDealsUsers"
SHEET = "users"
base_url = "https://api.sheety.co"
@angelabauer
angelabauer / main.py
Created April 13, 2023 10:50
Solution for main.py for the Flight Club
import sheety
print("Welcome to John's Flight Club.\n \
We find the best flight deals and email them to you.")
first_name = input("What is your first name? ").title()
last_name = input("What is your last name? ").title()
email1 = "email1"
email2 = "email2"
@angelabauer
angelabauer / index.html
Created September 23, 2020 11:10
Simple HTML Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form>
<label>Name</label>
<input type="text" placeholder="name">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="{{ url_for('login') }}" method="post">
<label>Name</label>
<input type="text" placeholder="name" name="name">
import UIKit
struct CalculatorBrain {
var bmi: BMI?
func getBMIValue() -> String {
let bmiTo1DecimalPlace = String(format: "%.1f", bmi?.value ?? "0.0")
return bmiTo1DecimalPlace
}
import Foundation
struct CalculatorBrain {
var bmi: Float = 0.0
func getBMIValue() -> String {
let bmiTo1DecimalPlace = String(format: "%.1f", bmi)
return bmiTo1DecimalPlace
}
import UIKit
class CalculateViewController: UIViewController {
@IBOutlet weak var heightLabel: UILabel!
@IBOutlet weak var weightLabel: UILabel!
@IBOutlet weak var heightSlider: UISlider!
@IBOutlet weak var weightSlider: UISlider!
//1. Create bmi property to store the calculated value.
var numbers = [45, 73, 195, 53]
var n1 = numbers[0] * numbers[1]
var n2 = numbers[1] * numbers[2]
var n3 = numbers[2] * numbers[3]
var computedNumbers = [n1, n2, n3]
print(computedNumbers)
var a = 5
var b = 8
//Create a new variable c to store the value in b (c = 8)
var c = b
//Change the value of b to equal the value of a (b = 5)
b = a
//Change the value of a to equal the value of c (a = 8)
//
// ViewController.swift
// Dicee-iOS13
//
// Created by Angela Yu on 11/06/2019.
// Copyright © 2019 London App Brewery. All rights reserved.
//
import UIKit