P1 Exam

P1 Exam

University

33 Qs

quiz-placeholder

Similar activities

Internship on "ML & DL using Python"

Internship on "ML & DL using Python"

University

35 Qs

Coding Club_SNSCE Quiz (28-04-2023)

Coding Club_SNSCE Quiz (28-04-2023)

University

30 Qs

Python MCQ for II Sem

Python MCQ for II Sem

University

30 Qs

Object Oriented Programming-Finals

Object Oriented Programming-Finals

University

30 Qs

Operators and Data types

Operators and Data types

University

32 Qs

PYTHON

PYTHON

University

30 Qs

Python Coding Specialist Exam

Python Coding Specialist Exam

9th Grade - Professional Development

31 Qs

PEMROGRAMAN TERSTRUKTUR - X RPL

PEMROGRAMAN TERSTRUKTUR - X RPL

University

30 Qs

P1 Exam

P1 Exam

Assessment

Quiz

Computers

University

Hard

Created by

John Prado

Used 1+ times

FREE Resource

33 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What does an if statement do in Python?
Repeats a block of code multiple times.
Executes a block of code if a condition is true.
Defines a function.

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is a programming language?
A set of rules for writing programs
A type of computer hardware
A method for data storage
An operating system

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is the correct syntax for an if-else statement in Python?
if (condition): { code } else { code }
if condition: code else: code
if condition: code elif condition: code

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will be the output of the following code? num = 10 if num > 5: print("Greater") else: print("Smaller")
Greater
Smaller
10
Error

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is a high-level language?
C
Python
Assembly
Machine Code

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following statements is used to check multiple conditions in Python?
if-else
elif
while
for

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In a nested if statement, what happens if the outer condition is false?
The inner if statement is still checked
The inner if statement is ignored.
The code exits the program.
None of the above.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?