#Minecraft ore percent calculator
import random
diamond = 0.06
stone = 85.1
dirt = 9.6
gravel = 2.6
coal = 1
redstone = 0.75
iron = 0.58
gold = 0.06
sand = 3.0
sandstone = 0.5
y = ""
price = ""
list1 = (diamond, stone, dirt, gravel, coal, redstone, iron, gold, sand, sandstone)
price = int(input("What do you want DIAMOND? to cost?"))
print("Diamond: ", price/(diamond/0.06))
print("Stone: ", price/(stone/0.06))
print("Dirt: ", price/(dirt/0.06))
print("Gravel: ", price/(gravel/0.06))
print("Coal: ", price/(coal/0.06))
print("Redstone: ", price/(redstone/0.06))
print("Iron: ", price/(iron/0.06))
print("Gold: ", price/(gold/0.06))
print("Sand: ", price/(sand/0.06))
print("Sandstone: ", price/(sandstone/0.06))
So this is what I have so far. I couldn't figure out how to make it work for a specific item. The numbers listed at the tops are the amount of items found per 100. So I want to be able to enter the price for an item and have the code give me back the prices relative to that item.
I tried doing something like this"
choice = input("Pick an item:"
price = int(input("What do you want it to cost?"))
Then using those 2 variables I would use a similar approach to what I did above. I wasn't able to figure it out for a specific choice, thus the reason that I settled on diamond.
I also tried using lists.
Just a note: I've only been doing this for a few weeks so I am an UberNoob..


Sign In
Create Account

Back to top










