Past-paper question · 2024 October-November · Paper 21 · Q8(b)

Question 8(b) 2024 · October-November · Paper 21 · 3 marks

Original past-paper question for 8(B)
Original past-paper question for 8(B)
Reveal official mark-scheme answer Official mark-scheme answer for 8(B)

Official answer for Question 8

Part (b)

✓
One mark for each point

Question 3

  • OPENFILE MyPassword.txt FOR WRITE
  • WRITEFILE MyPassword.txt, Password
  • CLOSEFILE MyPassword.txt
✓
Cambridge IGCSE – Mark Scheme
✓
0478/21
✓
October/November 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_w24_ms_21.pdf →

Show text version of question

Question 8

Part (b)

Question 8

A programmer is designing a program to check the length of a password and to check if the

password input is the same as the stored password.

The program requirements are:

  • input the password, Password
  • check if there are at least 8 characters in the password
  • check that the password is not the same as the stored password OldPass
  • output ‘accepted’ if both tests are completed successfully
  • otherwise, output ‘rejected’.

Use the variable names given.

Part (b)

The accepted password, Password, is to be written to the file MyPassword.txt

Write pseudocode to:

  • open the file
  • write the accepted password to the file
  • close the file.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

.............................................................................................................................................

[3]
Topic relevance

Why this question appears here

64% assigned-topic match · Programming › Programming concepts

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 0478_w24_qp_21.pdf

Keep practising this topic