Plutonic Rainbows

Mastercard

Interest rates are high on credit cards. Use the script below to calculate what you are paying on an APR of 1.45%.

# -*- coding: utf-8 -*-

def percentage(balance, divide, interest):
    return balance / divide * interest

balance = (float(raw_input("\nEnter Balance: ")))

new_total = percentage(balance, 100, 1.45)

print "\nOn a balance of £{0:.2f} there is £{1:.2f} in interest.\n".format (balance, new_total)

Ikebukuro Owl Police Box

Atlas Obscura:

Since the police box is within a stone’s throw of Ikebukuro Station and very eye-catching, many people use it as a meeting point. It’s probably one of the safest meeting points in Tokyo, right next to police officers.

Link

New Words

Artificial Intelligence: 人工知能.

For example, 大学から2年間ぐらい人工知能を勉強しました。

Neural Network (i.e Python's Tensor Flow): ニューラルネットワーク.

Machine Learning: 機械学習.

For example, 21世紀に機械学習の問題は増えます.

While Loop & Exit

A simple script that asks a user to guess the number. It uses a while loop that will continue to ask for user input until the condition is met. We then use exit() to break the loop.

from sys import exit

while True:
    print "Try and guess the number."
    guess = raw_input("> ")

    if guess == "7":
            print "You guessed correctly."
            exit(0)

    else:
        print "Wrong."

Week 11

Next week's work will be solely Japanese; namely Kanji and sentence construction. I'm also going to try and get a short story finished. A busy week ahead.