Data types
7
0/2

Each player in an online video game is assigned a unique tag. This is generated using the following algorithm:

01 nickname = input("Enter your nickname")
02 score = input("Enter high score")
03 tag = nickname + str(score)
04 while tag.length < 9
05     tag = tag + "!"
06 endwhile
07 print("Your tag is: " + tag)

Define the term casting and state the line number where casting is used in this algorithm.

[2]

Data types Questions

Practise OCR GCSE Computer Science Data types with exam-style questions for GCSE Computer Science. 26 questions, matched to the OCR GCSE Computer Science (J277) specification and written in Component 01 and Component 02 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Data types Questions

  1. GCSE
  2. /Computer Science
  3. /Data types