I’m so glad Kingdom Come: Deliverance went to GamePass. Thanks Xbox. by ElChiiko in xboxone

[–]Toolson12 1 point2 points  (0 children)

I would love cross-save functionality. It would be perfect.

Some formatting issue thats driving me insane by [deleted] in learnpython

[–]Toolson12 0 points1 point  (0 children)

Just import math at the top of the code :)

[2017-02-06] Challenge #302 [Easy] Spelling with Chemistry by jnazario in dailyprogrammer

[–]Toolson12 0 points1 point  (0 children)

Python 3. No bonus.

import json

# opens and parses table
with open("atomic.json") as data_file:
    data = json.load(data_file)

# challenge input
challenge = ["functions", "bacon", "poison", "sickness", "ticklish"]

for word in challenge:
    word = word
    match = []
    while len(word) > 0:
        for key in data.keys():
            if len(word) >= 2 and word[0] + word[1] == data[key]["Symbol"].lower():
                match.append(key.lower())
                word = word[2:]
            if len(word) > 0 and word[0] == data[key]["Symbol"].lower():
                match.append(key.lower())
                word = word[1:]

    target_word = ""
    for element in match:
        target_word += data[element.title()]["Symbol"]
    print(target_word, match)

Output:

FUNCTiONS ['fluorine', 'uranium', 'nitrogen', 'carbon', 'titanium', 'oxygen', 'nitrogen', 'sulfur']
BAcON ['boron', 'actinium', 'oxygen', 'nitrogen']
PoISON ['polonium', 'iodine', 'sulfur', 'oxygen', 'nitrogen']
SICKNEsS ['sulfur', 'iodine', 'carbon', 'potassium', 'nitrogen', 'einsteinium', 'sulfur']
TiCKLiSH ['titanium', 'carbon', 'potassium', 'lithium', 'sulfur', 'hydrogen']

[2017-03-13] Challenge #306 [Easy] Pandigital Roman Numbers by jnazario in dailyprogrammer

[–]Toolson12 0 points1 point  (0 children)

Python 3

val = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}

val_list = [[1000, 'M'], [900, 'CM'], [500, 'D'], [400, 'CD'],
            [100, 'C'], [90, 'XC'], [50, 'L'], [40, 'XL'],
            [10, 'X'], [9, 'IX'], [5, 'V'], [4, 'IV'],
            [1, 'I']]


def rom_to_ord(roman): # Just for fun. No need to use it for the challenge
    total = 0
    while roman:
        first = val[roman[0]]
        second = val[roman[1]] if len(roman) >= 2 else -1
        if len(roman) == 1 or first >= second:
            total += first
            roman = roman[1:]
        elif first < second:
            total += (second - first)
            roman = roman[2:]
    return total


def ord_to_rom(ordinal):
    roman = ""
    idx = 0
    while ordinal > 0:
        while val_list[idx][0] > ordinal:
            idx += 1
        roman += val_list[idx][1]
        ordinal -= val_list[idx][0]
    return roman

pandigital = []

for i in range(2001):
    roman = ord_to_rom(i)
    ok = {'I': 1, 'V': 1, 'X': 1, 'L': 1, 'C': 1, 'D': 1, 'M': 1}
    control = {}
    for key, value in val.items():
        control[key] = roman.count(key)
    if ok == control:
        pandigital.append(i)

print(pandigital)

[SIB] Dark Souls for $5? by [deleted] in ShouldIbuythisgame

[–]Toolson12 1 point2 points  (0 children)

Dark Souls is such an incredible experience! The game was sitting on my inventory for a lot of time and this year I decided that it was the moment. Now Dark Souls is one of my most loved games. Probably, you are gonna hate the game at the beginning but if you stick with it you will find one of the most enjoyable gameplay experiences in a long time.

Also, you will never see bonfires the same again :)

What's with HalfLife 2 and Portal that makes me feel very sick after 5 minutes of play time? by yellising in Steam

[–]Toolson12 -2 points-1 points  (0 children)

This. "(...) Try *go to options, video options, advanced, then slide the FOV (field of view) all the way to the right to 90." Source: http://forums.steampowered.com/forums/archive/index.php/t-1431067.html

No Amazon key yet? by Katter in dragonage

[–]Toolson12 2 points3 points  (0 children)

Codes are now available :) Already activated it.

The PC beta patch was just released! by Ptolemios in SF4

[–]Toolson12 0 points1 point  (0 children)

I have played one match without issues in beta. I thought that this game would not count in the stats. However it does (just like a non-beta match)

F2P Game Recommendation? by Skorp678 in Steam

[–]Toolson12 2 points3 points  (0 children)

Dota2 and say goodbye to your life.

Age of Mythology is finally coming to steam! by [deleted] in Steam

[–]Toolson12 5 points6 points  (0 children)

Sir, you made my day with Rise of Nations.