Search Header Logo

J277.2.1.2.L2.A2

Authored by Ian Currie

Computers

10th - 11th Grade

Used 1+ times

J277.2.1.2.L2.A2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

Write an algorithm using Exam Reference Language for problem below

a)         The program asks the user to enter the number of hours they have been working for.

The system must output:

·         the number of minutes they have been working

·         the number of seconds they have been working.

Evaluate responses using AI:

OFF

Answer explanation

hoursWorked = input("Enter the number of hours worked")

numberMinutes = hoursWorked * 60

numberSeconds = numberMinutes * 60

print ("number of minutes = " + numberMinutes)

print ("number of seconds = " + numberSeconds)

2.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

The program asks the user to enter two numbers. Output the largest of these two numbers.

Evaluate responses using AI:

OFF

Answer explanation

num1 = input("Enter the first number")

num2 = input("Enter the second number")

if num1 > num2 then

print(num1 + " is larger")

elseif num2 > num1 then

print(num2 + " is larger")

else

print("The numbers are the same")

endif

3.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

The program that asks the user to enter the number of letters in the alphabet. Output whether they got it correct, or incorrect.

Evaluate responses using AI:

OFF

Answer explanation

answer = input("How many letters are in the alphabet?")

if answer == 26 then

print("Correct")

else

print("Incorrect")

endif

4.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

The program asks the user to enter a number. The program then outputs the times table for that number, e.g. if they enter 5 it displays 5, 10, 15 etc.

Evaluate responses using AI:

OFF

Answer explanation

number = input("Enter a number")

for x = 1 to 12

print(x * number)

next x

5.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

The program asks the user to enter a number. The program then outputs the times table for that number, e.g. if they enter 5 it displays 5, 10, 15 etc.

Evaluate responses using AI:

OFF

Answer explanation

number = input("Enter a number")

for x = 1 to 12

print(x * number)

next x

6.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

The program asks the user for two numbers and a symbol (+, -, /, * or ^). The program then outputs the calculation based on the symbol, e.g. if 2, 3 and + were entered it would output 2 + 3 = 5.

Evaluate responses using AI:

OFF

Answer explanation

num1 = input("Enter a number")

num2 = input("Enter a number")

symbol = input("Enter a symbol")

if symbol == "+" then

print(num1 + num2)

elseif symbol == "-" then

print(num1 – num2)

elseif symbol == "/" then

print(num1 / num2)

elseif symbol == "*" then

print(num1 * num2)

elseif symbol == "^" then

print(num1 ^ num2)

else

print("Invalid symbol")

endif

7.

OPEN ENDED QUESTION

5 mins • Ungraded

Media Image

The amount of water in a fish tank, in litres, is calculated using the formulae:

(height x width x depth) / 1000.

The program must take the height, width and depth as input and output a suitable message e.g. The tank holds 221.6 litres of water.

Evaluate responses using AI:

OFF

Answer explanation

height = input("Enter the tank height")

width = input("Enter the tank width")

depth = input("Enter the tank depth")

water = (height width depth) / 1000

print("The tank holds " + water + " litres of water")

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?