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 3 of 4
Convert between strings & numbers.
Casting converts a value from one type to another. Use int(), float(), and str() to convert. This is essential when working with input(), which always returns a string.
int("5") converts string to integer → 5float("3.14") converts string to float → 3.14str(42) converts integer to string → "42"int(3.9) truncates to 3 (does not round)num_str = "42"
num = int(num_str) # 42 as int
pi = float("3.14") # 3.14 as float
label = str(100) # "100" as stringBack to Data Types and Casting
Specification notes for programming are in Paper 2.