Photo AI

A program needs to perform the following tasks: - Input two numbers from the user - Compare both numbers and output the largest number - OCR - GCSE Computer Science - Question 2 - 2023 - Paper 1

Question icon

Question 2

A-program-needs-to-perform-the-following-tasks:----Input-two-numbers-from-the-user---Compare-both-numbers-and-output-the-largest-number-OCR-GCSE Computer Science-Question 2-2023-Paper 1.png

A program needs to perform the following tasks: - Input two numbers from the user - Compare both numbers and output the largest number. (a) Complete the pseudocode... show full transcript

Worked Solution & Example Answer:A program needs to perform the following tasks: - Input two numbers from the user - Compare both numbers and output the largest number - OCR - GCSE Computer Science - Question 2 - 2023 - Paper 1

Step 1

num1 = .............................................

96%

114 rated

Answer

num1 = input("enter first number")

Step 2

...................... num1 > ........................... then

99%

104 rated

Answer

if num1 > num2 then

Step 3

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

96%

101 rated

Answer

output num1

Step 4

else

98%

120 rated

Answer

output num2

Join the GCSE students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;