Search Header Logo
Python - Session 2 - L2 - Built in Functions & Programs

Python - Session 2 - L2 - Built in Functions & Programs

Assessment

Presentation

•

Computers

•

6th Grade - Professional Development

•

Medium

Created by

SURBHI BHARDWAJ

Used 5+ times

FREE Resource

12 Slides • 22 Questions

1

Python - Session 2 - L2 - Built in Functions & Programs

by SURBHI BHARDWAJ

2

Multiple Choice

Which is the Python logo?

1
2
3
4

3

Multiple Choice

The Python interpreter takes the code that you write and converts it to the language that the computer’s hardware understands.

1

TRUE

2

FALSE

4

​When you try to run Python scripts, a multi-step process begins.
In this process the interpreter will:

​

​

  • Process the statements of your script in a sequential fashion.

  • Compile the source code to an intermediate format known as bytecode. 

  • Ship off the code for execution. 

The whole process to run Python scripts is known as the Python Execution Model.

5

Multiple Choice

When you try to run Python scripts, a multi-step process begins. In this process the interpreter performs three steps:

1. Ship off the code for execution.

2. Process the statements of your script in a sequential fashion.

3. Compile the source code to an intermediate format known as bytecode.

Identify the correct order of these steps:

1

3 → 2 → 1

2

2 → 3 → 1

3

1 → 3 → 2

6

media

7

Multiple Choice

What is the extension on a Python file name?

1

.py

2

.xsl

3

.ppt

4

.docx

8

Multiple Choice

What is the name of the environment in Python that write your programs and then test them out?
1
Shell
2
Window
3
IDLE
4
CLI

9

Multiple Choice

What button do you press to compile (run) your program so that it runs in the shell?
1
F3
2
F5
3
F7
4
F9

10

media

11

Multiple Choice

Escape sequence is represented by a ____ followed by one or more characters

1

Front slash

2

Double Quote

3

Single Quote

4

Back Slash

12

Multiple Choice

An escape sequence represents how many characters ?

"\t"

1

3

2

2

3

1

4

4

13

media

14

Multiple Choice

To include the use of functions which are present in the random library, we must use the option:

1

import random

2

random.h

3

import.random

4

random.random

15

Multiple Choice

random.randrange(6)

1

0,1,2,3,4,5,6

2

1,2,3,4,5,6

3

0,1,2,3,4,5

4

1,2,3,4,5

16

Multiple Choice

random.randint(3,8)

1

4,5,6,7

2

3,4,5,6,7

3

3,4,5,6,7,8

4

0,1,2,3,4,5,6,7,8

17

Multiple Choice

random.random() generates a floating point number between _____ and ______

1

1 and 2

2

1 and 0

3

0 and 1

4

0 and 10

18

Multiple Choice

str="Red\

block\

a"

Size of str is 11. True/False ?

1

True

2

False

19

media

20

Fill in the Blanks

what is the return type of input in python

Type answer...

21

media

22

Multiple Choice

What is the name of this symbol (>>>)?

1

Chevrons

2

Hash tags

3

Colon

4

Semi Colon

23

media

24

Multiple Choice

What is the displayed value for Python coding below:


print(min(100, 200, 300, 400))

1

100

2

200

3

300

4

400

25

Multiple Choice

What is the displayed value for Python coding below:


print(max(100, 200, 300, 400))

1

100

2

200

3

300

4

400

26

Multiple Choice

What is the displayed value for Python coding below:


print(math.pi)

1

3.141592653589793

2

3.142

3

31.41592653589793

4

π

27

Multiple Choice

What is the displayed value for Python coding below:


print(min(-100, -200, 100, 200))

1

-100

2

-200

3

100

4

200

28

Multiple Choice

What is the displayed value for Python coding below:


print(max(-100, -200, +100, +200))

1

+100

2

+200

3

100

4

200

29

Multiple Choice

What is the displayed value for Python coding below:


print(pow(2, 2))

1

4

2

8

3

2

4

16

30

media

31

Fill in the Blanks

what is the return type of eval() in python?

Type answer...

32

media

33

media

34

media
pattern-tertiary
Python - Session 2 - L2 - Built in Functions & Programs

by SURBHI BHARDWAJ

Show answer

Auto Play

Slide 1 / 34

SLIDE