Skip to main content

Posts

Showing posts from June, 2021

Codechef ATM Problem Solve in Python

  Codechef --- ATM Problem Solve in Python Pooja would like to withdraw X $US from an ATM . The cash machine will only accept the transaction if X is a multiple of 5, and Pooja's account balance has enough cash to perform the withdrawal transaction (including bank charges). For each successful withdrawal, the bank charges 0.50 $US. Calculate Pooja's account balance after an attempted transaction. Ex. - Positive integer 0 < X <= 2000 - the amount of cash which Pooja wishes to withdraw. Nonnegative number 0<= Y <= 2000 with two digits of precision - Pooja's initial account balance. Example - Successful Transaction Input: 30 120.00 Output: 89.50 Code :-- total_amount = 120 #int(input("Enter your total avalable account balence:-- ")) cash_withdr = 30 #int(input("How much money do you want :-- ")) check_amount = cash_withdr * 4 if check_amount <= total_amount: now_balence = float(((total_amount - cash_withdr) - 0.50)) print(&quo

10 Reasons Why Python is so much in Demand?

  10 Reasons Why Python is so much in Demand? Python is one of the most prevalent programming languages. It is highly user-friendly and an open-source language. Python is not only growing its popularity but also enhancing its applications in almost every field.  Python is one of the most prevalent programming languages. It is highly user-friendly and an open-source language. Python is not only growing its popularity but also enhancing its applications in almost every field. 1. Python has Simple Syntax Python language is very simple and easy to handle. It has a very easy and user-friendly syntax. It is not too difficult to code in Python because of its syntax. Its syntax is somewhat similar to that of the English Language. It does not have complicated syntax as other languages. You can code in Python even without having in-depth knowledge of Python . It does not even require any braces; it just works on indentation. 2. Python has an Abundance of Libraries and Frameworks It consists of

Python Libraries a Data Scientist must know

  Top 21 Python Libraries a Data Scientist must know Python is an   abundant source   of   libraries . A Python library is a gathering of  functions  that assist one to  perform many actions . It has  myriad inbuilt   libraries . Python contains ample libraries for  data science . This tutorial covers  Python libraries  for a data scientist. 1. Data Cleaning and Data Manipulation Pandas NumPy Spacy SciPy 2. Data Gathering Beautiful Soap Scrapy Selenium 3. Data Visualisation Matplotlib Seaborn Bokeh Plotly 4. Data Modelling Scikit-Learn PyTorch TensorFlow Theano 5. Image Processing Scikit-Image Pillow OpenCV 6. Audio Processing pyAudioAnalysis Librosa Madmom

why we use Numpy in python

  why we use NumPy in python NumPy  is a general-purpose array-processing package. It provides a high-performance multidimensional array object and tools for working with these arrays. It is the fundamental package for scientific computing with  Python .  A powerful N-dimensional array object. Syntex:-   import  numpy arr = numpy.array([ 1 ,  2 ,  3 ,  4 ,  5 ]) print (arr)     Output:-   [1 2 3 4 5] NumPy  is a basic level external library in Python  used  for complex mathematical operations.  NumPy  overcomes slower executions with the  use  of multi-dimensional array objects. It has built-in functions for manipulating arrays. We can convert different algorithms to can into functions for applying on arrays.   NumPy  arrays are faster and more compact than Python lists. An array consumes less memory and is convenient to  use .  NumPy uses  much less memory to store data and it provides a mechanism of specifying the data types.

Elon Musk

  Elon Musk Elon Musk   (born June 28, 1971,  Pretoria , South Africa), South African-born American  entrepreneur  who cofounded the electronic-payment firm  PayPal  and formed  SpaceX , maker of launch vehicles and spacecraft. He was also one of the first significant investors in, as well as chief executive officer of, the  electric car  manufacturer Tesla. Early life Musk was born to a South African father and a Canadian mother. He displayed an early talent for computers and entrepreneurship. At age 12 he created a video game and sold it to a computer magazine. In 1988, after obtaining a Canadian passport, Musk left South Africa because he was unwilling to support apartheid through compulsory military service and because he sought the greater economic opportunities available in the United States. PayPal and SpaceX Musk attended Queen’s University in Kingston, Ontario, and in 1992 he transferred to the University of Pennsylvania, Philadelphia, where he received bachelor’s degrees in p

Advantages and Disadvantages of machine learning

   Advantages and Disadvantages of  machine learning ? Machine learning  has seen use cases ranging from predicting customer behavior to forming the operating system for self-driving cars. When it comes to advantages,  machine learning  can help enterprises understand their customers at a deeper level. By collecting customer data and correlating it with behaviors over time,  machine learning  algorithms can learn associations and help teams tailor product development and marketing initiatives to customer demand. Some companies use  machine learning  as a primary driver in their business models. Uber, for example, uses algorithms to match drivers with riders. Google uses  machine learning  to surface the ride advertisements in searches. But  machine learning  comes with disadvantages. First and foremost, it can be expensive.  Machine learning  projects are typically driven by data scientists, who command high salaries. These projects also require software infrastructure that can be expe

Why is machine learning important?

  What is machine learning? Machine learning (ML) is a type of artificial intelligence (AI) that allows software applications to become more accurate at predicting outcomes without being explicitly programmed to do so. Machine learning algorithms use historical data as input to predict new output values. Recommendation engines are a common use case for machine learning. Other popular uses include fraud detection, spam filtering, malware threat detection, business process automation (BPA), and predictive maintenance. Why is machine learning important? Machine learning is important because it gives enterprises a view of trends in customer behavior and business operational patterns, as well as supports the development of new products. Many of today's leading companies, such as Facebook, Google and Uber, make machine learning a central part of their operations. Machine learning has become a significant competitive differentiator for many companies. What are the different types of mach

Linear Search

 Linear Search Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection. Linear Search Program def linear_search(list,target):     for i in range(0,len(list)):         if list[i] == target:             return i     return None def verify(index):     if index is not None:         print("Target found at index: ",index)     else:         print("Target not found in index")          numbers = [1,2,3,4,5,6,7,8,9,10]  result=linear_search(numbers,7) verify(result) Output:-    Target found at index: 6

Difference between loc() and iloc() in Pandas DataFrame

  Difference between loc() and iloc() in Pandas DataFrame Pandas library of python is very useful for the manipulation of mathematical data and is widely used in the field of machine learning. It comprises many methods for its proper functioning.  loc()  and  iloc()  are one of those methods. These are used in slicing data from the Pandas DataFrame. They help in the convenient selection of data from the DataFrame. They are used in filtering the data according to some conditions. The working of both of these methods is explained in the sample dataset of cars. loc()  :  loc()  is label-based data selecting method which means that we have to pass the name of the row or column which we want to select. This method includes the last element of the range passed in it, unlike  iloc() .  loc()   can accept the boolean data unlike  iloc()  .  iloc() :  iloc( )  is an indexed-based selecting method which means that we have to pass integer index in the method to select a specific row/column. This

Chirag Paswan

He's Not Our Leader: Chirag Paswan's Nightmare Monday As Party Revolts New Delhi:  An overnight coup in Chirag Paswan's Lok Janshakti Party (LJP), led by his uncle, has left him isolated at the top with five of six MPs breaking away and writing to the Lok Sabha Speaker, asking to be treated as a separate group. Including Chirag Paswan, the LJP has six MPs in the Lok Sabha. The five rebel MPs want a new leader to replace Chirag Paswan, the son of party founder Ram Vilas Paswan who died last year. They will meet with Speaker Om Birla soon to formally ask for his removal as their leader. The LJP revolt is led by Chirag Paswan's uncle Pashupati Kumar Paras, the younger brother of Ram Vilas Paswan. He has been elected as the new leader of the LJP parliamentary party. In escalating drama in Delhi, Chirag Paswan drove to his uncle's house for talks but stayed in his car. Mr. Paras did not come out to greet him either. "There are six MPs in our party. It was the desire

KAREENA KAPOOR KHAN

Kareena Kapoor Khan shares ‘ favorite meal’; find out The actor posted a photo of the dish with the text 'my favorite meal'. There was also a heart emoji and a chef's kiss sticker Actor Kareena Kapoor Khan has shared a photo on her Instagram story revealing that of all the foods, it is Kerala cuisine that is her favourite. The actor posted a photo of the dish, featuring banana leaves, on which were placed a portion of red rice with sambar on it, and some aviyal as well. The text reads ‘My favourite meal’. There was also a heart emoji and a chef’s kiss sticker. The actor tagged Marina Balakrishnan, a home chef specialising in Kerala cuisine, who ostensibly prepared the meal. Typically, a sadya involves steamed Kerala Matta rice or red parboiled rice, along with many side dishes. The menu also includes banana chips (upper), fritters coated with jaggery (sarkar Buratti), chutneys of various kinds, buttermilk, coconut water, and curries. Curries include the likes of inji (ginge