24 OCT 24 SRM EEC PO-27 Gamma Tech-TEST WEEK-11

24 OCT 24 SRM EEC PO-27 Gamma Tech-TEST WEEK-11

Assessment

Quiz

English

Professional Development

Hard

Created by

CCC info@ccc.training

Used 1+ times

FREE Resource

Student preview

quiz-placeholder

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of the following Python code? s = "hello" print(s[1:4])
ell
hel
lo
hello

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following methods can be used to convert a string to lowercase in Python?
str.lower()
str.upper()
str.title()
str.capitalize()

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of the following Python code? s = "Python Programming" print(s.split())
['Python', 'Programming']
['PythonProgramming']
['P', 'y', 't', 'h', 'o', 'n', ' ', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'm', 'i', 'n', 'g']
['Python', ' Programming']

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which method would you use to find the position of a substring within a string in Python?
location()
index()
position()
find()

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of the following Python code? s = "12345" print(s.isdigit())
True
false
Error
None

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which method would you use to join a list of strings into a single string in Python?
concat()
join()
merge()
combine()

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What will be the output of the following Python code? s = "hello world" print(s.capitalize())
Hello World
Hello world
HELLO WORLD
hello world

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?