Showing posts with the label Python revision Tour - 2

Carefully go through following code of Bubble Sort technique.

Q. (a) Carefully go through following code of Bubble Sort technique. It is crea…

Carefully read following description and try to identify sorting technique it is talking about.

Q. Carefully read the following description and try to identify the sorting tec…

Given a dictionary with 5 student names and their marks.

Q. Given a dictionary with 5 student names and their marks. write a program tha…

Write code to create python dictionary. add two entries to dictionary: associate key

Q. Write code to create a python dictionary. add two entries to the dictionary:…

total = 0 mydict = {cat:12, dog: 6

Q. What would be the output of following code? total = 0 mydict = {"cat&q…

mydict = {cat:12, dog:6, elephant:23, bear:20} print (23 in mydict)

Q. What would be the output of following code? mydict = {"cat":12, &q…

What would be output of following code? mydict = {cat:12, dog: 6

Q. What would be the output of following code? mydict = {"cat":12, &…

mydict = {cat:12, dog: 6, elephant:23,bear:20}

Q. What would be the output of following code? mydict = {"cat":12, &…

What would be output of following code? mydict =

Q. What would be the output of following code? mydict = {"cat":12, &q…

Read following pieces of code. Determine whether they will be executed successfully not.

Q. Read the following pieces of code. Determine whether they will be executed s…

Write program that sorts an array of integer in ascending order.

Q. Write a program that sorts an array of integer in ascending order. What if, …

Assume each of following lines is entered in the IDLE shell one at a time.

Q. Assume each of the following lines is entered in the IDLE shell one at a tim…

Consider following code: what is value of a at end?

Q. Consider the following code: what is the value of a at the end? a = [1, 2, 3…

Beside each expression, write LEGAL if expression is legal python code

Q. Beside each expression, write "LEGAL" if the expression is legal p…

Read following pieces of code. Determine whether they will be executed successfully or not.

Q. Read the following pieces of code. Determine whether they will be executed s…

Change above program to surround vowels with parentheses instead of not showing them.

Q. Change above program to surround the vowels with parentheses instead of not …

Define what we mean by traversal of a string. Write a program that inputs a word

Q. Define what we mean by traversal of a string. Write a program that inputs a …

What is a string slice? If a = blueberry evaluates the following

Q. What is a string slice? If a = "blueberry" evaluates the following…

If the addition of a new key:value pair causes the size of the dictionary to grow beyond

Q. If the addition of a new key:value pair causes the size of the dictionary to…

How are objects stored in lists and dictionaries different

Q. How are objects stored in lists and dictionaries different? Answer :- The ob…

Load More That is All