####What I Will Need To Include-
-
The exchange rates need to be able to be changed by user.
-
User should be able to enter amount.
-
The user should be able to select the chosen exchanging currency.
-
The printed figure should be to two decimal places.
####Pseudocode-
BEGIN
INPUT currency to be converted, currency converting to (Pound Sterling/Euro/US Dollar/Japanese Yen)
ASSIGN to variables: c_type1, c_type2
INPUT numb1 as c_type1[key]
MATCH c_type1, c_type2 to key in dictionary
IF c_type1 != Pound Sterling and c_type2 != Pound Sterling:
CONVERT c_type1 into Pound Sterling
CONVERT Pound Sterling into c_type2
RETURN int of c_type2
ELSE:
IDENTIFY Pound Sterling as c_type1 or c_type2
CHANGE this value to or from Pound Sterling
RETURN int of c_type2
END
####Variables-
Variables Used | Type of Variable | Discussion |
---|---|---|
currencies | Dictionary | Used to store the easily changeable exchange rates for each: GBP, EUR, USD and JPY. |
c_type1 | String | Used to store the 'converting from' input text. |
c_type2 | String | Used to store the 'converting to' input text. |
answer | String | Used to temporarily store c_type1 and type2 within the function. |
numb1 | Float | Used to store how many of the currency you wish to convert. |
While developing Task1, I ammended my code because I started with the following 'if' statements:
'''if c_type1 == "EUR":
print "exchange rate is", currencies["Euro"]
if c_type1 == "USD":
print "exchange rate is", currencies["US Dollar"]
if c_type1 == "JPY":
print "exchange rate is", currencies["Japanese Yen"]
if c_type2 == "GBP":
print "to", currencies["Pound Sterling"]
if c_type2 == "EUR":
print "to", currencies["Euro"]
if c_type2 == "USD":
print "to", currencies["US Dollar"]
if c_type2 == "JPY":
print "to", currencies["Japanese Yen"]'''
These could have worked but it was a waste of time because I realised it would be much easier to iterate through in a 'for' loop with a while statement, making sure that the c_type1 and type2 are equal to a valid currency at all times.
Looking back on what I have done, I think that I managed to get a good quality, working end result but if my pseudocode had have been better, I would have been able to achieve this quicker. But apart from that, the whole task went successfully.
####What I Will Need to Include-
-
A system that stores: a) Surname and First name. b) Two lines of address and postcode. c) A telephone number. d) date of birth. e) email address.
-
A search feature which iterates through the entries.
-
Can search through the surname entries and displays a contact.
-
Can search through the date of birth entries by month and display entries within this month.
####Pseudocode-
BEGIN
CHOOSE either search by surname or search by birthday month
IF by surname:
INPUT surname to be searched
FOR each surname:
IF surname == surname entered:
PRINT whole address entry
ELSE IF by birthday month:
INPUT birthday month to be searched (number format)
FOR each birthday month digits (mm of dd/mm/yy) in each address entry:
IF birthday month == birthday month entered:
PRINT whole address entry
END
####Variables-
Variables Used | Type of Variable | Discussion |
---|---|---|
choice | String | Used to store the decision text, deciding on which to search by. |
surname_search | String | Used to store which surname wishes to be searched. |
month_search | Integer | Used to store which month number wishes to be searched. |
count | Integer | Used to count how many entries fit in the search criteria. |
####What I Will Need to Include-
-
The inputted number should be only 10 digits long.
-
It should only contain numbers when inputted.
-
It should convert any 10-digit number into an 11-digit number.
============================ MADE BY GLEN HEBBERD