Signed up recently but had issues with the confirmation email?
Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.
Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.
301.4 Data Types and Casting
Practise exam questionsData Types and Casting — Note 4 of 4
Correct invalid type usage.
A TypeError happens when you use an operator on incompatible types, such as adding a string and an integer. The fix is to cast one value to match the other.
"5" + 3 causes TypeError — can't add str and intint("5") + 3 or "5" + str(3)input() always returns str — cast before mathsage = input("Age: ") # returns "15" (str)
# age + 1 ← TypeError!
age = int(age)
print(age + 1) # 16Back to Data Types and Casting
Specification notes for programming are in Paper 2.