Skip to content

Commit e4ca7ce

Browse files
Add files via upload
1 parent a5db6dd commit e4ca7ce

7 files changed

Lines changed: 1447 additions & 0 deletions

File tree

Various_Python/Bajoran_Orb.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# BAJORAN ORB OF PROPHACY
3+
# BY: ZANE DAX
4+
# JUN 29, 2021
5+
6+
7+
import numpy as np
8+
9+
x = np.random.randint(1,20)
10+
print(x)
11+
12+
13+
prophacy = ['The path ahead will be filled with temptations but stay steady','Your path is set, no need to worry as the Prophets know you will prevail','In your home, you will find some troubling details, things will be altered','Knowing your strengths is only 1 side of the equation','Take the hate for Cardassians and put into positive energy','Your Pah is strong, you are on the righteous path', 'Your fight is not with whom you think it is, there are layers','Victories are sweet like jumja sticks when you work hard for them, do not take shortcuts','In the garden you will find what you need, do not rush the adventure, savour the experience','Planting a tree in memory of loved ones is the path forward', 'Any peace you have is because of your Pah','Be careful of surprises, watch out for deception', 'You are guided to follow your passion, not latinum'
14+
]
15+
16+
num = int(input(f'Enter a number (1:{len(prophacy)-1}): '))
17+
print(f':: {num}')
18+
19+
if (num >=1 and num <= len(prophacy)):
20+
print(prophacy[x] )
21+
elif (num < 1):
22+
print('too low')
23+
elif (num > len(prophacy)):
24+
print('too high')
25+
else:
26+
print('not a valid number ')

Various_Python/TrekCurrency.py

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
2+
# Trek Currency converter
3+
# Zane Dax
4+
# July 7 2021
5+
6+
7+
import numpy as np
8+
import streamlit as st
9+
import pandas as pd
10+
import scipy
11+
12+
13+
14+
15+
16+
17+
# Title
18+
st.title('Star Trek Currency Exchange')
19+
20+
21+
x = np.random.randint(1,30, 5)
22+
# print(x)
23+
st.write(x[0],x[1],x[2],x[3],x[4])
24+
25+
26+
27+
28+
# --------- currency convert
29+
base = 1.00
30+
31+
UFP = base + 0.33
32+
currencyTObase = base / UFP # buy 1 unit of base from currency_1
33+
34+
Ferengi = base + 0.146
35+
baseToFerengi = base / Ferengi
36+
37+
Cardassian = 2005
38+
CardTObase = base / Cardassian
39+
40+
Bajoran = 6.38
41+
BajoranTObase = base / Bajoran
42+
43+
44+
45+
46+
# 1 USD = 6.32 Kuna, 1 Kuna = 0.16
47+
# 1 USD = 5.93 Cedi ,1 Cedi = 0.17
48+
49+
st.markdown("## Convert currency to ")
50+
51+
# selectbox
52+
currencyOption_1 = st.selectbox(
53+
"What currency do want to convert to ?",
54+
['UFP','Ferengi','Cardassian','Bajoran','Klingon','Vulcan']
55+
)
56+
# st.write('You selected: ', currencyOption_1)
57+
58+
if currencyOption_1 == "UFP":
59+
st.write(" 1 UFP costs from base",UFP)
60+
if currencyOption_1 =="Ferengi":
61+
st.write(" 1 Ferengi unit from base costs", Ferengi)
62+
if currencyOption_1 =="Cardassian":
63+
st.write(" 1 Cardassian unit from base costs", Cardassian)
64+
if currencyOption_1 =="Bajoran":
65+
st.write(" 1 Bajoran unit from base costs", Bajoran)
66+
67+
68+
#------------- selectbox
69+
st.markdown("## Convert currency from ")
70+
currencyOption_2 = st.selectbox(
71+
"What currency do want to convert from ?",
72+
['UFP','Ferengi','Cardassian','Bajoran','Klingon','Vulcan']
73+
)
74+
# st.write('You selected: ', currencyOption_2)
75+
76+
if currencyOption_2 == "UFP":
77+
st.write(" from UFP currency to base ", round(currencyTObase,3))
78+
if currencyOption_2 =="Ferengi":
79+
st.write(" from Ferengi currency to base", round(baseToFerengi,3))
80+
if currencyOption_2 =="Cardassian":
81+
st.write(" from Cardassian to base", round(CardTObase,4))
82+
if currencyOption_2 == "Bajoran":
83+
st.write(" from 1 Bajoran to base", round(BajoranTObase,3))
84+
85+
86+
87+
# you want 1,500 euros, and want to know what it costs in USD.
88+
# Multiply 1,500 by 1.146 to get 1,719 USD
89+
# number input
90+
st.title("Currency Converter")
91+
number = st.number_input('Enter quantity of currency')
92+
93+
money_units = number * Ferengi
94+
st.write(round(number,2)," UFP coins costs", round(money_units,3)," in Ferengi currency")
95+
96+
money_units = number * Cardassian
97+
st.write(round(number,2)," UFP coins costs", round(money_units,3)," in Cardassian currency")
98+
99+
money_units = number * Bajoran
100+
st.write(round(number,2)," UFP coins costs", round(money_units,3)," in Bajoran currency")
101+
102+
103+
# interactive widgets
104+
# if st.button("Convert", help='Click here'):
105+
# st.write("Submitted")
106+
# else:
107+
# st.write("")
108+
109+
110+
# radio button
111+
radioButton = ['Federation','Ferengi','Klingon','Vulcan']
112+
b = st.radio('Pick one Radio Button', radioButton)
113+
114+
if b =="Ferengi":
115+
st.write(f" **{round(money_units,3)}** Ferengi to 1 UFP")
116+
117+
118+
119+
# trek_stocks = pd.DataFrame(
120+
# np.random.randint(1e6,5e8,(10,10)),
121+
# {Planet: ['one', 'two','three','four','five','six','seven','eight','nine','ten']},
122+
# columns=['TSX','ASX','BSX',
123+
# 'RSX','REX','VMX.V',
124+
# 'BNXR','CRXM','DRX.L',
125+
# 'ENTX'],
126+
# # index=[1,11]
127+
# )
128+
129+
130+
beverages = pd.Series({
131+
'Organia Crush': 6.7,
132+
'Risa Tequila Splash': 7.3,
133+
'Trill Swill': 4.5,
134+
'Barzan Man': 8.8,
135+
'Ardana Banana': 7.8,
136+
'Remus Rum Drum': 9.6,
137+
'Arrithean Gin Mint': 8.5,
138+
'Karemma Berry Punch': 9.9,
139+
'Dosi Tula-Mosh': 7.5,
140+
'Brax the Max': 5.5
141+
})
142+
143+
st.dataframe(beverages)
144+
145+
item = beverages[0]
146+
st.write(f" the price is {item}")
147+
148+
149+
150+
151+
152+
153+
154+
155+
st.multiselect('Multiselect', [1,2,3])
156+
157+
# st.select_slider('Slide to select', options=[1,5,'20'])
158+
159+
t = st.time_input('Time entry')
160+
st.write(f" Stardate entered {t}")
161+
162+
163+
st.color_picker('Pick a color')
164+
165+
check = st.checkbox('Check me out')
166+
if check == True:
167+
st.write("*check*")
168+
169+
check1 = st.checkbox('Read Terms & Conditions')
170+
check2 = st.checkbox('Registered for Conference')
171+
check3 = st.checkbox('Booked accommodations')
172+
if check1 and check2 and check3 == True:
173+
st.write(" All set")

0 commit comments

Comments
 (0)