GCSE Computer Science (OCR) OCR J277 2.2.2 5 min

Data types and casting

Every value has a data type, which decides what can be done with it. input() always gives a string, so cast it with int() or float() before calculating.

Quiz yourself

Your teacher can set you a self-marking quiz on this lesson. Sign in to see the quizzes set for you.

Pupil sign in

10.1 Systems Architecture and First Programs

10 videos