Skip to content

Course home

Data types

Data types

Easy
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Question 34

An algorithm designed to approximate the sum of a convergent infinite series is shown below.

1  OUTPUT 'Enter the upper limit of the sum:'
2  limit_str ← USERINPUT
3  max_terms ← TO_INTEGER(limit_str)
4  total_sum ← 0.0
5  FOR k ← 1 TO max_terms
6      total_sum ← total_sum + 1.0 / (k * k)
7  ENDFOR

Select one option to show the data type of the variable total_sum in the algorithm.

A

Boolean

B

Integer

C

Real

D

String

Markscheme

Data types Questions

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

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

Question bank