100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

AQA GCSE COMPUTER SCIENCE Paper 1 Computational thinking and programming skills – C# 2023

Beoordeling
-
Verkocht
-
Pagina's
98
Cijfer
A+
Geüpload op
12-01-2024
Geschreven in
2023/2024

Figure 1 shows an algorithm, represented using pseudo-code, which assigns a different value to four variables. Figure 1 country  'United States of America' state  'California' city  'San Francisco' landmark  'Alcatraz Island' . 1 Define the term algorithm. The variable x is assigned a value using the statement: x  LEN(state) Using Figure 1, what is the value of x? Shade one lozenge. What is the result of concatenating the contents of the variables city and landmark in Figure 1? Shade one lozenge. The subroutine SUBSTRING extracts characters from a given string. For example, SUBSTRING(3, 5, 'Computing') would return put The variable y is assigned a value using the statement: y  SUBSTRING(4, 7, landmark) Using Figure 1, what is the value of y? Shade one lozenge. The subroutine POSITION finds the first position of a character in a string. For example, POSITION('Computing', 'p') would return 3 The variable z is assigned a value using the statement: z  POSITION(landmark, 't') Using Figure 1, what value is assigned to z? Shade one lozenge. Figure 2 shows an algorithm that uses integer division which has been represented using pseudo-code. • Line numbers are included but are not part of the algorithm. Figure 2 1 again  True 2 WHILE again = True 3 a  USERINPUT 4 IF a > 0 THEN 5 counter  0 6 WHILE a > 0 7 a  a DIV 3 8 counter  counter + 1 9 ENDWHILE 10 ELSE 11 again  False 12 ENDIF 13 OUTPUT a 14 ENDWHILE Integer division is the number of times one integer divides into another, with the remainder ignored. For example: • 14 DIV 5 evaluates to 2 • 25 DIV 3 evaluates to 8 11 Do not write outside the box Turn over ► IB/G/Jun23/8525/1A . 1 0 2 Where is iteration first used in the algorithm in Figure 2? Shade one lozenge. Figure 3 shows a program written in C# that calculates the area of a rectangle or the volume of a box from the user inputs. Figure 3 public static int calculate(int width, int length, int height) { if (height == -1) { return width * length; } else { return width * length * height; } } public static void Main() { int numOne, numTwo, numThree, answer; Console.Write("Enter width: "); numOne = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter length: "); numTwo = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter height, -1 to ignore: "); numThree = Convert.ToInt32(Console.ReadLine()); answer = calculate(numOne, numTwo, numThree); if (numThree == -1) { Console.WriteLine($"Area {answer}"); } else { Console.WriteLine($"Volume {answer}");

Meer zien Lees minder
Instelling
Computer Science
Vak
Computer Science











Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Computer Science
Vak
Computer Science

Documentinformatie

Geüpload op
12 januari 2024
Aantal pagina's
98
Geschreven in
2023/2024
Type
Tentamen (uitwerkingen)
Bevat
Alleen vragen

Onderwerpen

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
twishfrancis Kaplan University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
202
Lid sinds
2 jaar
Aantal volgers
42
Documenten
10607
Laatst verkocht
4 uur geleden
SmartStudy Hub

Discover top-quality study materials at SmartStudy Hub. From concise summaries to exam guides, I offer resources designed to boost your grades. Trust in my expertise and elevate your academic performance today! NB: I do assignments too. Struggling to meet your academic deadlines? I\'ve got you covered! I\'ll ensure papers are delivered on time, each time. Don\'t let deadlines stress you out- let\'s work together to achieve your academic goals! WELCOME!!!

Lees meer Lees minder
4,0

38 beoordelingen

5
22
4
6
3
4
2
0
1
6

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen