Posts

Showing posts from July, 2022

DATAISGOOD INTERVIEW QUESTIONS

Image
  DATA SCIENCE INTERVIEW QUESTIONS PYTHON 1)Difference between List, Tuple, Set, Dict List:- l=[1,1,1,2,2,68,9,98,46]          Duplicates allowed, Order is imp Tupple:- Same as list except that is it immutable.          l[0]=7777// Error Set:- Order not imp, duplicates not allowed dict:- key,value pair, no duplicate key but value can be duplicate. 2)How to check armstrong number? # Python program to check if the number is an Armstrong number or not # take input from the user num = int( input ( "Enter a number: " )) # initialize sum sum = 0 # find the sum of the cube of each digit temp = num while temp > 0 : digit = temp % 10 sum += digit ** 3 temp //= 10 # display the result if num == sum: print (num, "is an Armstrong number" ) else : print (num, "is not an Armstrong number" ) 3)Program to swap without using temporary variable? x=5 y="greate" x,y=y,x print(x) print(y)         ...