Join Regular Classroom : Visit ClassroomTech

Author name: Code_Window

Switch Case in C

It is a statement in C that allows to execute a specific code block. It is one of the many alternative ways. Note: switch case follows a top-down approach. Syntax : Example : 1 Explanation:For value 1, the expression is matched with all the case values, the case value which matches with the expression i.e.

Switch Case in C Read More »

Verbal Ability

Question 1: Mark the option best suited to replace the underlined portion of the sentence given belowI am tired as I am running since morningA) I was runningB) I had been runningC) I will be runningD) I have been running Answer : B) I had been running Question: 2 The sentence given below forms a

Verbal Ability Read More »

Remove first two elements in Python List

There are many ways of doing it-1. pop method- list.pop()2. remove method- list.remove(list[index])3. del function- del list[index]4. slicing- list[2:] Here is an example for you- Output: Explanation:Here,pop(0) pops the first element from the list. The for loop executes the block 2 times which means the first element is popped every time the list gets updated.remove(b[0])

Remove first two elements in Python List Read More »

Remove the first element and add it to last in Python List

There are many ways of doing it, here are a few ways-1. pop method – list.pop()2. slicing – list[:1],list[1:] Here is an example for you- Output: Explanation:Here,pop(0) pops the first element from the list. Then the popped element is added to the last using append() method.d[:1] slices the array/list till index 0 which means the

Remove the first element and add it to last in Python List Read More »