What you'll learn
Learn how generative AI works
Explore the benefits and drawbacks of generative AI
Learn how generative AI can integrate into our daily lives
Python Coding January 09, 2024 AI, Coursera No comments
Learn how generative AI works
Explore the benefits and drawbacks of generative AI
Learn how generative AI can integrate into our daily lives
Python Coding January 09, 2024 Coursera, Python No comments
Learn Python 3 basics, from the basics to more advanced concepts like lists and functions.
Practice and become skilled at solving problems and fixing errors in your code.
Gain the ability to write programs that fetch data from internet APIs and extract useful information.
Python Coding January 08, 2024 Python Coding Challenge No comments
complex_num = 4 + 3j
print(abs(complex_num))
The above code calculates the absolute value (magnitude) of a complex number and prints the result. In this case, the complex number is 4 + 3j. The absolute value of a complex number is given by the square root of the sum of the squares of its real and imaginary parts.
Let's break it down:
complex_num = 4 + 3j
This line creates a complex number with a real part of 4 and an imaginary part of 3.
print(abs(complex_num))
This line calculates the absolute value of the complex number using the abs function and then prints the result. The output will be:
5.0
So, the absolute value of the complex number 4 + 3j is 5.0.
Python Coding January 08, 2024 Coursera, Data Science No comments
Conduct an inferential statistical analysis
Discern whether a data visualization is good or bad
Enhance a data analysis with applied machine learning
Analyze the connectivity of a social network
Python Coding January 08, 2024 AI, Coursera, Data Science No comments
What is AI and AI use cases, Machine Learning, Deep Leaning, and how training and inference happen in a Deep Learning Workflow.
The history and architecture of GPUs, how they differ from CPUs, and how they are revolutionizing AI.
Become familiar with deep learning frameworks, AI software stack, and considerations when deploying AI workloads on a data center on prem or cloud.
Requirements for multi-system AI clusters and considerations for infrustructure planning, including servers, networking, storage and tools.
Python Coding January 08, 2024 Coursera, IBM, Software No comments
Develop a DevOps mindset, practice Agile philosophy & Scrum methodology - essential to succeed in the era of Cloud Native Software Engineering
Create applications using Python language, using various programming constructs and logic, including functions, REST APIs, and libraries
Build applications composed of microservices and deploy using containers (e.g. Docker, Kubernetes, and OpenShift) & serverless technologies
Employ tools for automation, continuous integration (CI) and continuous deployment (CD) including Chef, Puppet, GitHub Actions, Tekton and Travis.
Python Coding January 08, 2024 AI, Coursera No comments
Learn about the business problems that AI/ML can solve as well as the specific AI/ML technologies that can solve them.
Learn important tasks that make up the workflow, including data analysis and model training and about how machine learning tasks can be automated.
Use ML algorithms to solve the two most common supervised problems regression and classification, and a common unsupervised problem: clustering.
Explore advanced algorithms used in both machine learning and deep learning. Build multiple models to solve business problems within a workflow.
Python Coding January 08, 2024 AI, Coursera No comments
Compare AI with human intelligence, broadly understand how it has evolved since the 1950s, and identify industry applications
Identify and use creative and critical thinking, design thinking, data fluency, and computational thinking as they relate to AI applications
Explain how the development and use of AI requires ethical considerations focusing on fairness, transparency, privacy protection and compliance
Describe how thinking skills embedded in Australian curricula can be used to solve problems where AI has the potential to be part of the solution
Python Coding January 07, 2024 Course, Coursera, MICHIGAN No comments
Add interacitivity to web pages with Javascript
Describe the basics of Cascading Style Sheets (CSS3)
Use the Document Object Model (DOM) to modify pages
Apply responsive design to enable page to be viewed by various devices
This Specialization covers the basics of how web pages are created – from writing syntactically correct HTML and CSS to adding JavaScript to create an interactive experience. While building your skills in these topics you will create websites that work seamlessly on mobile, tablet, and large screen browsers. During the capstone you will develop a professional-quality web portfolio demonstrating your growth as a web developer and your knowledge of accessible web design. This will include your ability to design and implement a responsive site that utilizes tools to create a site that is accessible to a wide audience, including those with visual, audial, physical, and cognitive impairments.
Python Coding January 07, 2024 Python No comments
Lists and sets in Python are both used for storing collections of elements, but they have several differences based on their characteristics and use cases. Here are some key differences between lists and sets in Python:
Ordering:
Lists: Maintain the order of elements. The order in which elements are added is preserved, and you can access elements by their index.
Sets: Do not maintain any specific order. The elements are unordered, and you cannot access them by index.
Uniqueness:
Lists: Allow duplicate elements. You can have the same value multiple times in a list.
Sets: Enforce uniqueness. Each element in a set must be unique; duplicates are automatically removed.
Declaration:
Lists: Created using square brackets [].
Sets: Created using curly braces {} or the set() constructor.
Mutability:
Lists: Mutable, meaning you can change the elements after the list is created. You can add, remove, or modify elements.
Sets: Mutable, but individual elements cannot be modified once the set is created. You can add and remove elements, but you can't change them.
Indexing:
Lists: Allow indexing and slicing. You can access elements by their position in the list.
Sets: Do not support indexing or slicing. Elements cannot be accessed by position.
Here's a brief example illustrating some of these differences:
# Lists
my_list = [1, 2, 3, 3, 4, 5]
print(my_list) # Output: [1, 2, 3, 3, 4, 5]
print(my_list[2]) # Output: 3
# Sets
my_set = {1, 2, 3, 3, 4, 5}
print(my_set) # Output: {1, 2, 3, 4, 5}
# print(my_set[2]) # Raises TypeError, sets do not support indexing
In the above example, the list allows duplicates and supports indexing, while the set automatically removes duplicates and does not support indexing. Choose between lists and sets based on your specific requirements for ordering, uniqueness, and mutability.
Python Coding January 07, 2024 Python Coding Challenge No comments
aList = ["Clcoding", [4, 8, 12, 16]]
print(aList[1][3])
Python Coding January 06, 2024 Python No comments
Python Coding January 06, 2024 Python Coding Challenge No comments
Python Coding January 06, 2024 Books, Python No comments
This introductory textbook in undergraduate probability emphasizes the inseparability between data (computing) and probability (theory) in our time. It examines the motivation, intuition, and implication of the probabilistic tools used in science and engineering:
Motivation: In the ocean of mathematical definitions, theorems, and equations, why should we spend our time on this particular topic but not another?
Intuition: When going through the deviations, is there a geometric interpretation or physics beyond those equations?
Implication: After we have learned a topic, what new problems can we solve?
Python Coding January 06, 2024 Python Coding Challenge No comments
a. Inheritance is the ability of a class to inherit properties and behavior
from a parent class by extending it.
Answer
True
b. Containership is the ability of a class to contain objects of different
classes as member data.
Answer
True
c. We can derive a class from a base class even if the base class's source
code is not available.
Answer
True
d. Multiple inheritance is different from multiple levels of inheritance.
Answer
True
e. An object of a derived class cannot access members of base class if the
member names begin with.
Answer
True
f. Creating a derived class from a base class requires fundamental changes
to the base class.
Answer
False
g. If a base class contains a member function func( ), and a derived class
does not contain a function with this name, an object of the derived class
cannot access func( ).
Answer
False
h. If no constructors are specified for a derived class, objects of the derived
class will use the constructors in the base class.
Answer
False
i. If a base class and a derived class each include a member function with
the same name, the member function of the derived class will be called
by an object of the derived class.
Answer
True
j. A class D can be derived from a class C, which is derived from a class
B, which is derived from a class A.
Answer
True
k. It is illegal to make objects of one class members of another class.
Answer
False
Python Coding January 06, 2024 Python No comments
from fractions import Fraction
# Convert decimal to fraction
decimal_number = input("Enter a Decimal Number:")
fraction_result = Fraction(decimal_number).limit_denominator()
print(f"Decimal: {decimal_number}")
print(f"Fraction: {fraction_result}")
#clcoding.com for free code visit
Let's break down the code step by step:
from fractions import Fraction
This line imports the Fraction class from the fractions module. The Fraction class is used to represent and perform operations with rational numbers.
# Convert decimal to fraction
decimal_number = input("Enter a Decimal Number:")
This line prompts the user to enter a decimal number by using the input function. The entered value is stored in the variable decimal_number.
fraction_result = Fraction(decimal_number).limit_denominator()
Here, the entered decimal_number is converted to a Fraction object using the Fraction class. The limit_denominator() method is then called to limit the denominator of the fraction to a reasonable size.
print(f"Decimal: {decimal_number}")
print(f"Fraction: {fraction_result}")
These lines print the original decimal number entered by the user and the corresponding fraction.
#clcoding.com for free code visit
This line is a comment and is not executed as part of the program. It's just a comment providing a website link.
So, when you run this code, it will prompt you to enter a decimal number, convert it to a fraction, and then print both the original decimal and the corresponding fraction. The limit_denominator() method is used to present the fraction in a simplified form with a limited denominator.
Python Coding January 06, 2024 Python No comments
Python Coding January 06, 2024 Python No comments
An extremely handy programmer’s standard library reference that is as durable as it is portable. This 6 page laminated guide includes essential script modules used by developers of all skill levels to simplify the process of programming in Python. This guide is all script and is organized to find needed script quickly. As with QuickStudy reference on any subject, with continued reference, the format lends itself to memorization. Beginning students or seasoned programmers will find this tool a perfect go-to for the at-a-glance script answer and memory jog you might need. At this price and for the bank of script included it’s an easy add to your programmer’s toolbox.
6 page laminated guide includes:
General Functionality
Date/Time Processing
System and Computer Controls
OS Module
Classes of the OS Module
Pathlib Module
Threading Module
Debugging Functionality
PDB Module
Debugging for the PDB Module
Mathematic and Numeric Operations
Math Module
Random Module
Iterable and Iterator Operations
Collections Module
Classes of the Collections Module
Itertools Module
Web and Data Transfer Operations
HTML Parser Module
HTML Module
Audio Manipulation
Python Coding January 05, 2024 Python Coding Challenge No comments
p = 'Love for Coding'
print(p[4], p[5])
Python Coding January 05, 2024 Python Coding Challenge No comments
a. The exception handling mechanism is supposed to handle compile time
errors.
Answer
False
b. It is necessary to declare the exception class within the class in which an
exception is going to be thrown.
Answer
False
c. Every raised exception must be caught.
Answer
True
d. For one try block there can be multiple except blocks.
Answer
True
e. When an exception is raised, an exception class's constructor gets called.
Answer
True
f. try blocks cannot be nested.
Answer
False
g. Proper destruction of an object is guaranteed by exception handling
mechanism.
Answer
False
h. All exceptions occur at runtime.
Answer
True
i. Exceptions offer an object-oriented way of handling runtime errors.
Answer
True
j. If an exception occurs, then the program terminates abruptly without
getting any chance to recover from the exception.
Answer
False
k. No matter whether an exception occurs or not, the statements in the
finally clause (if present) will get executed.
Answer
True
l. A program can contain multiple finally clauses.
Answer
False
m. finally clause is used to perform cleanup operations like closing the
network/database connections.
Answer
True
n. While raising a user-defined exception, multiple values can be set in the
exception object.
Answer
True
o. In one function/method, there can be only one try block.
Answer
False
p. An exception must be caught in the same function/method in which it is
raised.
Answer
False
q. All values set up in the exception object are available in the except block
that catches the exception.
Answer
True
r. If our program does not catch an exception then Python runtime catches
it.
Answer
True
s. It is possible to create user-defined exceptions.
Answer
True
t. All types of exceptions can be caught using the Exception class.
Answer
True
u. For every try block there must be a corresponding finally block.
Answer
False
Python Coding January 04, 2024 Python Coding Challenge No comments
s = set('CLC')
t = list(s)
t = t[::-1]
print(t)
Step 1: Define the set and convert it to a list:
s = set('CLC')
t = list(s)
We define a set s containing the characters C, L, and C (duplicates are ignored in sets).
Then, we convert the set s to a list t using the list() function. This creates a list containing the unique elements of the set in an arbitrary order.
Step 2: Reverse the list:
t = t[::-1]
We use the slicing operator [::-1] to reverse the order of elements in the list t.
Step 3: Print the reversed list:
print(t)
Finally, we print the reversed list t.
Output:
['L', 'C']
As you can see, the output shows the characters from the original set in reverse order (L and C).
Python Coding January 04, 2024 Coursera, Machine Learning No comments
This course is part of the Deep Learning Specialization
When you enroll in this course, you'll also be enrolled in this Specialization.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate
Python Coding January 04, 2024 Coursera, Machine Learning No comments
Explore several classic Supervised and Unsupervised Learning algorithms and introductory Deep Learning topics.
Build and evaluate Machine Learning models utilizing popular Python libraries and compare each algorithm’s strengths and weaknesses.
Explain which Machine Learning models would be best to apply to a Machine Learning task based on the data’s properties.
Improve model performance by tuning hyperparameters and applying various techniques such as sampling and regularization.
Python Coding January 04, 2024 Coursera, IBM, Machine Learning No comments
This course is available as part of multiple programs,
When you enroll in this course, you'll also be asked to select a specific program.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate
Python Coding January 04, 2024 Coursera, Machine Learning No comments
Write custom Python code and use existing Python libraries to build and analyse efficient portfolio strategies.
Write custom Python code and use existing Python libraries to estimate risk and return parameters, and build better diversified portfolios.
Learn the principles of supervised and unsupervised machine learning techniques to financial data sets
Gain an understanding of advanced data analytics methodologies, and quantitative modelling applied to alternative data in investment decisions
Python Coding January 04, 2024 Coursera, Machine Learning No comments
Learn the skills needed to be successful in a machine learning engineering role
Prepare for the Google Cloud Professional Machine Learning Engineer certification exam
Understand how to design, build, productionalize ML models to solve business challenges using Google Cloud technologies
Understand the purpose of the Professional Machine Learning Engineer certification and its relationship to other Google Cloud certifications
Python Coding January 03, 2024 Books, Python No comments
While Excel remains ubiquitous in the business world, recent Microsoft feedback forums are full of requests to include Python as an Excel scripting language. In fact, it's the top feature requested. What makes this combination so compelling? In this hands-on guide, Felix Zumstein--creator of xlwings, a popular open source package for automating Excel with Python--shows experienced Excel users how to integrate these two worlds efficiently.
Excel has added quite a few new capabilities over the past couple of years, but its automation language, VBA, stopped evolving a long time ago. Many Excel power users have already adopted Python for daily automation tasks. This guide gets you started.
Use Python without extensive programming knowledge
Get started with modern tools, including Jupyter notebooks and Visual Studio code
Use pandas to acquire, clean, and analyze data and replace typical Excel calculations
Automate tedious tasks like consolidation of Excel workbooks and production of Excel reports
Use xlwings to build interactive Excel tools that use Python as a calculation engine
Connect Excel to databases and CSV files and fetch data from the internet using Python code
Use Python as a single tool to replace VBA, Power Query, and Power Pivot
Python Coding January 03, 2024 Python Coding Challenge No comments
Rewrite the following code snippet in 1 line:
x = 3
y = 3.0
if x == y :
print('x and y are equal')
else :
print('x and y are not equal')
print('x and y are equal' if x == y else 'x and y are not equal')
The condition x == y is evaluated.
If the condition is True, the expression before the if (i.e., 'x and y are equal') is executed.
If the condition is False, the expression after the else (i.e., 'x and y are not equal') is executed.
So, in a single line, this code snippet prints either 'x and y are equal' or 'x and y are not equal' based on the equality of x and y.
Python Coding January 03, 2024 Python Coding Challenge No comments
display( ) is an object method as it receives the address of the object
(inself) using which it is called. show( ) is class method and it can be
called independent of an object.
In the given code snippet, display() is a method of a class (Message), and show() is a standalone function. The key difference lies in their usage and the context in which they are defined.
display(self, msg):
This is a method of a class named Message.
The method takes two parameters: self (a reference to the instance of the class) and msg (another parameter).
The display() method is intended to be called on an instance of the Message class, and it can access and manipulate the attributes of that instance.
Example:
# Creating an instance of the Message class
my_message = Message()
# Calling the display method on the instance
my_message.display("Hello, World!")
show(msg):
This is a standalone function that is not part of any class.
It takes a single parameter, msg.
The show() function is not associated with any specific instance of a class and does not have access to instance-specific attributes.
Example:
# Calling the show function without an instance
show("Hello, World!")
In summary, the display() method is associated with instances of the Message class and can be called on those instances, while the show() function is standalone and can be called without creating an instance of any class. The distinction between methods and standalone functions is an essential concept in object-oriented programming.
Python Coding January 03, 2024 Python Coding Challenge No comments
a. Class attributes and object attributes are same.
Answer
False
b. A class data member is useful when all objects of the same class must
share a common item of information.
Answer
True
c. If a class has a data member and three objects are created from this class,
then each object would have its own data member.
Answer
True
d. A class can have class data as well as class methods.
Answer
True
e. Usually data in a class is kept private and the data is accessed /
manipulated through object methods of the class.
Answer
True
f. Member functions of an object have to be called explicitly, whereas, the
_init_( ) method gets called automatically.
Answer
True
g. A constructor gets called whenever an object gets instantiated.
Answer
True
h. The _init_( ) method never returns a value.
Answer
True
i. When an object goes out of scope, its _del_( ) method gets called
automatically.
Answer
True
j. The self variable always contains the address of the object using which
the method/data is being accessed.
Answer
True
k. The self variable can be used even outside the class.
Answer
False
l. The _init_( ) method gets called only once during the lifetime of an
object.
Answer
True
m. By default, instance data and methods in a class are public.
Answer
True
n. In a class 2 constructors can coexist-a 0-argument constructor and a 2-
argument constructor.
Answer
True
Python Coding January 02, 2024 Coursera, IBM, Scripting No comments
Describe the Linux architecture and common Linux distributions and update and install software on a Linux system.
Perform common informational, file, content, navigational, compression, and networking commands in Bash shell.
Develop shell scripts using Linux commands, environment variables, pipes, and filters.
Schedule cron jobs in Linux with crontab and explain the cron syntax.
Python Coding January 02, 2024 Coursera, Data Science, SQL No comments
Extract data from different sources and map it to Python data structures.
Design Scripts to connect and query a SQL database from within Python.
Apply scraping techniques to read and extract data from a website.
Python Coding January 02, 2024 Coursera, Data Science, IBM, SQL No comments
Working knowledge of Data Engineering Ecosystem and Lifecycle. Viewpoints and tips from Data professionals on starting a career in this domain.
Python programming basics including data structures, logic, working with files, invoking APIs, using libraries such as Pandas and Numpy, doing ETL.
Relational Database fundamentals including Database Design, Creating Schemas, Tables, Constraints, and working with MySQL, PostgreSQL & IBM Db2.
SQL query language, SELECT, INSERT, UPDATE, DELETE statements, database functions, stored procs, working with multiple tables, JOINs, & transactions.
Python Coding January 02, 2024 Coursera, Data Science, IBM, R No comments
Manipulate primitive data types in the R programming language using RStudio or Jupyter Notebooks.
Control program flow with conditions and loops, write functions, perform character string operations, write regular expressions, handle errors.
Construct and manipulate R data structures, including vectors, factors, lists, and data frames.
Read, write, and save data files and scrape web pages using R.
Python Coding January 02, 2024 Coursera, Data Science, IBM No comments
Write a web scraping program to extract data from an HTML file using HTTP requests and convert the data to a data frame.
Prepare data for modelling by handling missing values, formatting and normalizing data, binning, and turning categorical values into numeric values.
Interpret datawithexploratory data analysis techniques by calculating descriptive statistics, graphing data, and generating correlation statistics.
Build a Shiny app containing a Leaflet map and an interactive dashboard then create a presentation on the project to share with your peers.
Python Coding January 02, 2024 Python Coding Challenge No comments
The output of the code will be 48.
Here's a breakdown of how the code works:
Function Definition:
The code defines a recursive function named fun that takes two integer arguments, x and y.
Base Case:
If x is equal to 0, the function returns y. This is the base case that stops the recursion.
Recursive Case:
If x is not 0, the function calls itself recursively with the arguments x - 1 and x * y. This means the function keeps calling itself with updated values until it reaches the base case.
Function Call and Output:
The code calls the fun function with the arguments 4 and 2: print(fun(4, 2)).
This initiates the recursive process, which unfolds as follows:
fun(4, 2) calls fun(3, 8) because 4 is not 0.
fun(3, 8) calls fun(2, 24).
fun(2, 24) calls fun(1, 48).
fun(1, 48) calls fun(0, 48).
Finally, fun(0, 48) returns 48 because x is now 0 (the base case is reached).
This value, 48, is then printed to the console, resulting in the output you see.
In essence, the code calculates a product of numbers in a recursive manner, with the final product being 2 * 4 * 3 * 2 = 48.
Python Coding January 02, 2024 Python Coding Challenge No comments
a. If a recursive function uses three variables a, b and c, then the same set
of variables are used during each recursive call.
Answer
True
b. If a recursive function uses three variables a, b and c, then the same set
of variables are used during each recursive call.
Answer
False
c. Multiple copies of the recursive function are created in memory.
Answer
False
d. A recursive function must contain at least 1 return statement.
Answer
True
e. Every iteration done using a while or for loop can be replaced with
recursion.
Answer
True
f. Logics expressible in the form of themselves are good candidates for
writing recursive functions.
Answer
True
g. Tail recursion is similar to a loop.
Answer
True
h. Infinite recursion can occur if the base case is not properly defined.
Answer
True
i. A recursive function is easy to write, understand and maintain as
compared to a one that uses a loop.
Answer
False
Python Coding January 01, 2024 Python Coding Challenge No comments
The above code uses the filter function along with a lambda function to filter out elements from the list lst based on a condition. In this case, it filters out elements that have a length less than 8. Here's a breakdown of the code:
lst = ['Python', 'Clcoding', 'Intagram']
lst1 = filter(lambda x: len(x) >= 8, lst)
print(list(lst1))
lambda x: len(x) >= 8: This lambda function checks if the length of the input string x is greater than or equal to 8.
filter(lambda x: len(x) >= 8, lst): The filter function applies the lambda function to each element of the list lst. It retains only those elements for which the lambda function returns True.
list(lst1): Converts the filtered result into a list.
print(list(lst1)): Prints the final filtered list.
In this specific example, the output would be:
['Clcoding', 'Intagram']
This is because only the elements 'Clcoding' and 'Intagram' have lengths greater than or equal to 8.
Python Coding January 01, 2024 Python Coding Challenge No comments
a. lambda function cannot be used with reduce( ) function.
Answer
False
b. lambda, map( ), filter( ), reduce( ) can be combined in one single
expression.
Answer
True
c. Though functions can be assigned to variables, they cannot be called
using these variables.
Program
False
d. Functions can be passed as arguments to function and returned from
function.
Program
True
e. Functions can be built at execution time, the way lists, tuples, etc. can
be.
Program
True
f. Lambda functions are always nameless.
Program
True
Free Books Python Programming for Beginnershttps://t.co/uzyTwE2B9O
— Python Coding (@clcoding) September 11, 2023
Top 10 Python Data Science book
— Python Coding (@clcoding) July 9, 2023
🧵:
Top 4 free Mathematics course for Data Science ! pic.twitter.com/s5qYPLm2lY
— Python Coding (@clcoding) April 26, 2024
Web Development using Python
— Python Coding (@clcoding) December 2, 2023
🧵: