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
// ViewController.swift | |
import UIKit | |
import WebKit | |
class ViewController: UIViewController { | |
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 math | |
def max_magnitude(user_val1, user_val2): | |
max_num = 0 | |
if user_val1 >= user_val2: # If user_val1 is greater than user_val2, output user_val1 | |
max_num = abs(user_val1) | |
elif user_val2 >= user_val1: # If user_val2 is greater than user_val1, output user_val2 | |
max_num = abs(user_val2) | |
else: | |
max_num = None # Error |