Search Header Logo

AQA GCSE Computer Science - 3.2.8 String Handling/Random No.

Authored by Mr Ling-Winston

Computers

8th - 10th Grade

Used 7+ times

AQA GCSE Computer Science - 3.2.8 String Handling/Random No.
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which function gives a random integer which is between 100 and 200 and divisible by 3?

random.randrange(100, 200, 3)
random.randint(100, 200, 3)
random.random(100, 200, 3)
yuvraj.yavraj(100, 200, 3)

2.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

What is the function to generate a hex token of 32 bytes?

secret.token_hex(32)
secret.token_hex32
secret.hex_32
secret_hex(32)

3.

FILL IN THE BLANK QUESTION

20 sec • 1 pt

Random = random.randint(1,6). What are the chances of Random being 4?

4.

OPEN ENDED QUESTION

20 sec • Ungraded

List = ["Apple", "Apple", "Banana", "Pear"]. Fruit = random.choice(list). Print(Fruit). What are the chances of the fruit being an apple?

Evaluate responses using AI:

OFF

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

list = [1,2,3,4]. Newlist = random.shuffle(list). Print(newlist). What happens?

[1,2,3,4]
[1,4,3,2]
Nothing
Error

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the function of string handling operations

To handle heavy string operations
To make strings longer
To stop alex being a fat melt
To change type of variable used

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

STRING_TO_INT("84") evalautes to...

8.4
"84"
84
"8.40"

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?