Answer all questions. box
0 1 Figure 1 shows an algorithm, represented using pseudo-code.
The algorithm assigns different values to two variables, then asks the user to input
a letter.
Figure 1
film  "Godzilla vs. Kong"
year  2021
OUTPUT "Please guess a letter"
letter  USERINPUT
0 1 . 1 Which pseudo-code statement assigns the length of the string film to a variable
called value?
Shade one lozenge.
[1 mark]
A film  LEN(value)
B film  film + value
C value  film
D value  LEN(film)
0 1 . 2 The POSITION subroutine returns the position of the first occurrence of a character
in a string.
For example:
• POSITION("Godzilla vs. Kong", "o") would return 1
• POSITION("Godzilla vs. Kong", "z") would return 3
letter and film are variables used in the algorithm in Figure 1.
Complete the pseudo-code statement to find the position of the first occurrence of the
contents of letter in film and store this position in the variable location
You must use the POSITION subroutine in your answer.
[1 mark]
location 
3
*03*
Turn over ►
IB/G/Jun24/8525/1B
Do not write
outside the
0 1 . 3 Which of the following would be the most suitable data type for the variable year? box
Shade one lozenge.
[1 mark]
A Boolean
B character
C integer
D real
0 1 . 4 Describe what is meant by an assignment statement in a program.

No comments found.
Login to post a comment

jordancarter 6 months ago

This study guide is clear, well-organized, and covers all the essential topics. The explanations are concise, making complex concepts easier to understand. It could benefit from more practice questions, but overall, it's a great resource for efficient studying. Highly recommend!
Login to review this item
Q. What will I receive when I purchase this document?
A. You will receive a PDF that is available for instant download upon purchase. The document will be accessible to you at any time, from anywhere, and will remain available indefinitely through your profile.
Q. Satisfaction guarantee: how does it work?
A. Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Q. Who am I buying these notes from?
A. you are buying this document from us learnexams
Q. Will I be stuck with a subscription?
A. No, you only buy these notes for $ indicated . You are not obligated to anything after your purchase.
Q. Can learnexams be trusted?
A. check our reviews at trustpilot
Price $24.50
Add To Cart

Buy Now
Category AQA PAPERS AND MARK SCHEME
Comments 0
Rating
Sales 0

Buy Our Plan

We have

The latest updated Study Material Bundle with 100% Satisfaction guarantee

Visit Now
{{ userMessage }}
Processing