Skip to content

Course home

Data types

Data types

Easy
1234567891011121314151617181920212223242526
Question 7

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]
Markscheme

Data types Questions

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

26 exam-style questions on OCR GCSE Computer Science Data types. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank