You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/pythonimportmathimportosimportrandomimportreimportsys## Complete the 'reverse_words_order_and_swap_cases' function below.## The function is expected to return a STRING.# The function accepts STRING sentence as parameter.#defreverse_words_order_and_swap_cases(sentence):
word_list=sentence.split()
reversed_list=word_list[:: -1]
reversed_sentence=" ".join(reversed_list)
returnreversed_sentence.swapcase()
if__name__=='__main__':
fptr=open(os.environ['OUTPUT_PATH'], 'w')
sentence=raw_input()
result=reverse_words_order_and_swap_cases(sentence)
fptr.write(result+'\n')
fptr.close()
selectstd.roll_number, std.namefrom student_information std, faculty_information fi
wherestd.advisor=fi.employee_idand (fi.gender='M'andfi.salary>15000orfi.gender='F'andfi.salary>20000)
Sql Intermediate
Products without sales
select sku,product_name from PRODUCT P left join INVOICE_ITEM Ii onIi.product_id=P.idwhere invoice_id is NULLorder by SKU;
Customer Spending
selectb.customer_name,cast(a.total_priceasdecimal(10,6))amount from customer b, invoice a wherea.customer_id=b.idanda.total_price<=(select (0.25*avg(a.total_price)) FROM invoice a) order by amount desc ;
***or***select customer_name,to_char(total_price,'fm9999999.900000') from customer c, Invoice i wherec.id=i.customer_idand total_price < (select (0.25)*sum(total_price)/count(id) from Invoice);