Looking for EG1007 Introduction to Programming (PRD1 A 2024/25) test answers and solutions? Browse our comprehensive collection of verified answers for EG1007 Introduction to Programming (PRD1 A 2024/25) at moodle4.city.ac.uk.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
x = 6
y = 5
Choose a suitable way to swap the values of x and y.
write the python statement to assign 6 + x to x
What is the result of x after executing the following code
x = 1
x = x * 1
x = x * 2
x = x * 3
x = x * 4
this code can be used to calculate factorial of 4, 4!. Can you think about how to calculate 100! ?
what is the result of the following expression?
4 / 3 * ( 4 * 1.5 + 1.5 ** 2)
What is the type of 3.0%2?
what is the result of the following expression?
12 + 2**(2 * 3) + 2
what is the result of the following expression?
rho = 1000
g = 9.8066
r = 2
h = 3
pi = 3.14
rho*g*pi*r**2*h
What is the type of 'I like Python'?