Answer:
# string_contains function is defined with input_string
# as arguments
def string_contains(input_string):
# if-statement that check if letter z is in input_string
if 'z' in input_string:
# it print"has the letter z" if it has z
print("has the letter z")
else:
# else it print "not worthwhile"
print("not worthwhile")
# string_contains function is called
string_contains("The animal is zebra")
string_contains("learning is fun")
Explanation:
The code is written in Python and well commented.
Image of the output when the function is called is attached.
Answer:
Explanation:
SELECT DISTINCT
sl.stock_symbol AS "Stock SYmbol",
se.symbol AS "Stock Exchange Symbol",
se.name AS "Stock Exchange"
COUNT(t.shares) OVER (PARTITION BY sl.stock_symbol,se.symbol,se.name) AS "Total Trades"
MAX(t.trade_amt) OVER (PARTITION BY sl.stock_symbol,se.symbol,se.name) AS "Total Trade"
FROM stock_exchange se
JOIN trade t
ON se.stock_ex_id = t.stock_ex_id
JOIN stock_listing sl
ON t.stock_id = sl.stock_id AND sl.stock_ex_id = t.stock_ex_id
ORDER BY se.name, se.symbol, sl.stock_symbol;
I think it’s manufacturing