Shopping Bill Generator made with python. Code - -------------------------------------- def receipt_generator (): items = [] prices = [] print ( "Enter the name of item and price separating each other by a '-' eg- 'Tomato-56'" ) print ( "Enter 'q' at the place of items to stop item adding in receipt" ) try : while True : a = input () if a == 'q' : break else : items.append(a) print ( "Anant Kirana Store \n " ) for item in items: b = item.split( "-" ) item = b[ 0 ] price = b[ 1 ] prices.append(price) print ( f"Item = { item } , { price } " ) n = 0 for item in prices: item = int (item) n += item print ( f"Total = { n }\n " ) if n > 0 : print ( "Thanks fo...
Should we start preparation for BCA/MCA from class 11th ? How ? There isn't much to prepare for BCA/MCA while in class 11th. Just few basics thing to take in mind. Anyhow, Try that you have Computer science in class 11. While all works fine, both computer science and maths are pretty useful. Maths not so much as computer science but will definitely be useful. Science or other subjects aren't really needed that much in most times and if needed you can always learn the topic later on or take help from a knowledgeable person in that field. Make sure to learn at least few programming languages and polish your skills on it. Do focus on algorithm part - That's important. Try to learn different but revelant topics like Cloud Computing or Artificial Intelligence, Cryptography, Networking, etc. Do the one that will be best for you(Depending on which career you want to go for). You can and actually should learn basics behind how actually computers and rest of stuff work. You will be...
Python program to check that a list have elements in it or not. Code - -------------------------------- # Python program to check that a list have elements in it or not . list2 = [ "anant" , "shiv" , "hariom" , "utsav" , "shorya" , "ajay" , "carry" , "harry" ] def element_absence_checker (list): a = input ( "Enter the name of element which you want to check:- " ) for i in list: if i == a: print ( "Element present in list.." ) break else : print ( "Element doesn't present in list." ) element_absence_checker(list2)
Comments
Post a Comment