Question: Which function should you use to convert an integer into a binary number? a. bin() b. hex() c. int() d. oct() How can you write

Which function should you use to convert an integer into a binary number?

a. bin()
b. hex()
c. int()

d. oct()

How can you write the expression "n = n * 2" using short-hand operators?

a. n *= 2
b. n /= 2
c. n -= 2
d. n ^= 2

Which string function do you call when you want to convert the first letter in the string to uppercase?

a. str.startswith()
b. str.upper()
c. str.capitalize()
d. str.lower()

Which function do you call to check the number of items in a list?

a. size()
b. length()
c. check()
d. len()

Which operator is used to concatenate two lists?

a. <<
b. -
c. *
d. plus (+)

Which function do you call when you want to append an element at the end of a list?

a. list.append()
b. list.addatend()
c. list.endswith()
d. list.end()

What is the output of the following script?

a. ships
b. champ
c. pions
d. hampi

What is the output of the following script?

a. strawberries
b. bananas
c. mangoes
d. pears

How many values do Boolean data types contain?

a. 3
b. 0
c. 2
d. 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!