100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Python Exam UAH questions with correct answers rated A+ (18)

Rating
-
Sold
-
Pages
18
Grade
A+
Uploaded on
17-10-2024
Written in
2024/2025

Python Exam UAH questions with correct answers rated A+ (18)

Institution
Python
Course
Python










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Python
Course
Python

Document information

Uploaded on
October 17, 2024
Number of pages
18
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Python Exam UAH questions with
correct answers rated A+ (18)

Which of the following data types are not supported in Python? - correct answer ✔✔List, Set, Dict, Tuple



Which of the following data types are not supported in Python? - correct answer ✔✔int, string



What is the output of print(str) if str = 'Hello World!'? - correct answer ✔✔Hello World!



What is the output of print(str[0]) if str = 'Hello World!'? - correct answer ✔✔H



What is the output of print(str[2:5]) if str = 'Hello World!'? - correct answer ✔✔llo



What is the output of print(str[2:]) if str = 'Hello World!'? - correct answer ✔✔llo World!



What is the output of print(str * 2) if str = 'Hello World!'? - correct answer ✔✔Hello World!Hello World!



What is the output of print(list) if list=[ 'abcd', 786 ,2.23]? - correct answer ✔✔['abcd', 786, 2.23]



What is the output of print(list[0]) if list =['abcd',786, 2.23]? - correct answer ✔✔abcd



What is the output of print(list[1:3]) if list=['abcd', 786,2.23]? - correct answer ✔✔[786, 2.23]



What is the output of print(list[2:]) if list=[ 'abcd',786, 2.23]? - correct answer ✔✔[2.23]



What is the output of print (tinylist *2) if tinylist = [123, 'john']? - correct answer ✔✔[123, 'john', 123,
'john']

,Which of the following is correct about tuples in Python? - correct answer ✔✔you cant change them



What is the output of print(myTuple) if myTuple =

('abcd',786,2.23)? - correct answer ✔✔('abcd', 786, 2.23)



What is the output of print(myTuple[1:3]) if myTuple=('abcd',786,2.23)? - correct answer ✔✔(786, 2.23)



What is the output of print(myTuple[0]) if myTuple = ('abcd',786,2.23)? - correct answer ✔✔abcd



Which function obtains all the keys from a dictionary? - correct answer ✔✔keys()



Which function obtains all the values from a dictionary? - correct answer ✔✔values()



Which function converts a string to an int? - correct answer ✔✔int()



Which function converts a string to a float? - correct answer ✔✔float()



Which function converts a string to a tuple ? - correct answer ✔✔tuple()



Which function converts a string to a list? - correct answer ✔✔list()



Which function converts a sequence of tuples to dictionary? - correct answer ✔✔dict()



Which function converts an integer to a character? - correct answer ✔✔chr()



Which function converts an integer to an unicode character ? - correct answer ✔✔unichr()



Which function converts a single character to its integer value? - correct answer ✔✔ord(x)

, Which function converts an integer to hexadecimal string ? - correct answer ✔✔hex()



Which operator performs exponential power calculation on operands? - correct answer ✔✔**



Which operator performs the division where the result an integer? - correct answer ✔✔//



Which operator evaluates True when operands refer to the same object? - correct answer ✔✔==



Which operator evaluates True if it does not find a variable sequence? - correct answer ✔✔not in



Which statement stops and transfers to the statement after the loop? - correct answer ✔✔break



Which statement skips the loop & retests prior to reiterating? - correct answer ✔✔continue



Which statement is used when when you do not want any code to execute? - correct answer ✔✔pass



Which function returns a random item from a list, tuple, or string? - correct answer ✔✔choice()



Which function returns a randomly selected element from range? - correct answer ✔✔randrange()



Which function returns a random float between 0 and 1? - correct answer ✔✔random.uniform()



Which function sets the starting value in generating random numbers? - correct answer ✔✔seed()



Which function randomizes the items of a list in place? - correct answer ✔✔random



Which function capitalizes first letter of string? - correct answer ✔✔string.capitalize(0)



Which function checks in a string that all characters are alphanumeric? - correct answer ✔✔isalnum
R311,20
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Document also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
StuviaExamHub Havard School
Follow You need to be logged in order to follow users or courses
Sold
458
Member since
3 year
Number of followers
355
Documents
16965
Last sold
4 days ago
EXAM HUB (LATEST UPDATE)

QUALITY WORK OF ALL KIND OF QUIZ or EXAM WITH GUARANTEE OF AN A+ latest updates Im an expert on major courses especially; psychology,Nursing, Human resource Management & Project writing. Assisting students with quality work is my first priority. I ensure scholarly standards in my documents . I assure a GOOD GRADE if you will use my work. Feel free to purchase n recommend others for 100% pass EXAMS!

3,7

85 reviews

5
39
4
10
3
17
2
6
1
13

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions