
Tutorat_8
Authored by Maritina Panagiotopoulou
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
7 questions
Data mining-Clustering-1
Quiz
•
University
10 questions
Python with DataScience
Quiz
•
7th Grade - University
11 questions
SCM and Logistics
Quiz
•
University
12 questions
Quiz Game
Quiz
•
KG - Professional Dev...
12 questions
Coding - Beginner Level
Quiz
•
3rd Grade - University
10 questions
UTILITY PROGRAM
Quiz
•
University
10 questions
Data Warehouse - Foundations
Quiz
•
University
13 questions
Digital Technology Office 365 - 29May2020
Quiz
•
University - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade