Python Assessment Portfolio
Python Assessment Portfolio
Introduction to Python
Assessment
Name: Amber Dabin Form: 8R
Programming questions:
Look at each of the questions below relating to your program and complete your answers in
the text boxes.
Reading code
Amount = int(input("Enter conversion amount in pounds: "))
Currency = input("Press 1 for Indian Rupees, 2 for Chinese Yuan or 0 to
exit: ")
if Currency == "1":
Amount = Amount * 100
print ("You will get",Amount,"Indian Rupees")
elif Currency == "2":
Amount = Amount * 10
print ("You will get",Amount,"Chinese Yuan")
else:
print ("Goodbye")
What is the output if the input amount is ‘70’ and the currency choice is ‘2’?
The out put is 7.
What is the output if the input amount is ‘25’ and the currency choice is ‘1’?
The output is 26.
What is the output if the input amount is ‘20’ and the currency choice is ‘0’?
It will cancel the transaction and allow you to exit.
Data types
Name a variable in the currency conversion program. What data type would it be stored as?
Float.
1
Assessment Portfolio
Introduction to Python
Algorithms
Write out a pseudocode algorithm to simulate throwing random dice rolls between 1 and 6,
continuing until a 6 is rolled. The program should print each number rolled and the number of
simulated rolls taken to throw a 6.
Click here to begin writing your pseudocode.
Testing
Use the table below to complete three tests you carried out on your program and explain the
actual result.
Input
Test Description Expected Output Actual Result
Data
What is the capital of
1 France Incorrect London
England?
Donald
3 Who is the priminister? Incorrect Borris Johnson
trump
2
Assessment Portfolio
Introduction to Python
Assessment:
I have used I can distinguish I have written an error I have written a binary
Interactive and Script between syntax and free program involving search program
modes to successfully logic errors a while loop without
run a program I have help
written
I have written I have used I can describe how a I have included code
programs using mathematical and binary search is in my programs to
variables of different Boolean operators carried out help prevent user
data types (e.g. string such as AND, OR and input error
and integer) NOT
I can find and de-bug I have used an Elif I can explain the I have successfully
syntax errors statement in a advantages of a tested and de-bugged
working program binary search over a a logic error
linear search
3
Assessment Portfolio
Introduction to Python
How to progress
What I did well in this unit:
I can creat a simple python code on correct errors
Copy and paste your Python code for the same program into the area below:
Click here to paste your code.