
Tutorat_8

Quiz
•
Computers
•
University
•
Easy
Maritina Panagiotopoulou
Used 1+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, what is the primary purpose of a class?
To define the data type of a variable
To create instances of objects with specific attributes and methods
To provide a way to format strings
To define the encoding of Unicode characters
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about F-strings in Python is correct?
F-strings are used for defining classes
F-strings are a way to format strings with variable values
F-strings are used for defining Unicode characters
F-strings are not supported in Python
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is true about methods in programming classes?
Methods are standalone functions not associated with any class
Methods define the behavior of objects in a class and are common to all objects of that class
Methods are unique for each object and cannot be shared between objects
Methods in a class are only for displaying object properties
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How is a function defined in Python?
By using the function keyword
With the def keyword followed by the function's name and parameters
Functions in Python do not need to be defined
Using the return statement before writing the function body
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the findall() method return in Python?
A single match of the pattern
A dictionary containing all matches
The first group of matches in the pattern
A list of the entire matches of the pattern
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the outcome when using (?:...) in a regex pattern with findall()?
It captures the group and returns it as part of the result
The part of the pattern inside (?:...) is not captured but affects the matches
It causes an error in the findall() method
findall() ignores the entire regex pattern
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do functions affect the control flow in a Python program?
The control flow jumps to the function's code when called and returns after execution.
Functions prevent the program from executing any code.
Functions do not affect control flow in Python.
Control flow is interrupted permanently once a function is called.
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does type(2 == 1 + 1) return?
True
bool
Similar Resources on Wayground
12 questions
Python-Variables, Expressions

Quiz
•
University
10 questions
ISPFL1 Midterm Quiz #3

Quiz
•
University
7 questions
Python Basics Day 2

Quiz
•
University
13 questions
Object oriented programming in java

Quiz
•
University
10 questions
Q2 - Python

Quiz
•
University
10 questions
PSP Week3

Quiz
•
University
10 questions
The OOP Quiz

Quiz
•
University
10 questions
T02: Python - The Basics

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade