#!/usr/bin/env python
# coding: utf-8

# # Your Student ID:

# In[ ]:


# your student ID
6204641010


# # Question 1

# # This task, you want to find out Today's date by using the library time
# 
# Hint: Use time.FUNC_NAME.FUNC_NAME? (where FUNC_NAME is replaced with the function you found) to see information about that function and then call the function.

# In[1]:


import time as t

t.localtime()

# your code here -- notice the comment!


# # Question  2

# # 2.1 What is the standard deviation of the data:
# 
# Hint: Using the function std in library Numpy

# In[2]:


data = [1,3,1,2,9,4,5,6,10,4]


# In[3]:


# your code here -- notice the comment!

import numpy as np


# In[5]:


np.std(data)


# # 2.2 Then, you have the additional data as shown below

# In[6]:


add_data =[8,11,2,5,6,4,3,2]


# In[ ]:


Add the new data to the original data, then re-calculate the standard deviation again.


# In[7]:


# your code here -- notice the comment!
data.extend(add_data)
print(data)


# # Question 3

# In[ ]:


Consider the below information:


# In[8]:


data ={'Year':'2021','transactional data':{
 'transaction_id': 1000001,
 'source_country': 'United Kingdom',
 'target_country': 'Italy',
 'send_currency': 'GBP',
 'send_amount': 'GBP1000.00',
 'target_currency': 'EUR',
 'fx_rate EUR/GBP': 1.1648674,
 'fee_pct': 0.50, 
 'platform': 'mobile'}}


# # 3.1 Using the python code to pick up the foreign exchange rate  ('fx_rate EUR/GBP') from this dataset.

# In[12]:


print(data)


# In[18]:


# your code here -- notice the comment!
data['transactional data']["fx_rate EUR/GBP"]


# # 3.2 You now need to include the data for the "fee_amount," which can be determined from the funds you send to the target country (send_amount) multiplied by the fee percentage (fee_pct). 
# 
# Create the new keyword "fee_amount" for this dataset, and then report its value.
# 
# Hint: using replace() and float() to convert the 'send_amount' into a number.Then, multiply with fee percentage.

# In[44]:


data['transactional data']["send_amount"]


# In[45]:


gbp = data['transactional data']["send_amount"]

a, b = gbp.split("GBP")
b


# In[47]:


data['transactional data']["fee_pct"]


# In[48]:


c = data['transactional data']["fee_pct"]


# In[52]:


# your code here -- notice the comment!
fee_amount = {"b"} * {"c"}

print(fee_amount)


# In[ ]:




