Python Programming in Hindi

Please introduce a free certificate course on Java Script. Thank You

1 Like

Hi Javed,

Thank you for reaching out to us. We, at Great Learning Academy have launched over 80+ free courses with certifications on our website.
You can browse through all our courses here: https://www.greatlearning.in/academy
We are building more content videos for our learners to help them upskill. Meanwhile, stay tuned and keep checking the videos of your interest.

I am new in Python, i am getting this error “syntaxerror: invalid syntax” in my code and i can’t find the solution of my problem.Here is the code: ages = {‘barney’=82,}
SyntaxError: invalid syntax
Can somebody help me with this?

You have wrongly assigned the value to the key.You should use “ : ” instead of “=”.
ages = {‘barney’:82,}

Is there any shortcut to increment in python.I am using ++ as in use in C, but it is not working?

I am getting this error message in Python NameError: name ‘animal’ is not defined.Here is the code:
s = animal()
s.out()
Class animal:
def out():
print(“Here is an animal”)

I have a trouble in PyCharm during running my script with Selenium WebDriver:from selenium import webdriver
ModuleNotFoundError: No module named ‘selenium’
I have checked that selenium was installed:

How to remove an element from a list in python ?

I am new at programming and started off with Python.I am getting this error “ indexerror: tuple index out of range ” and i can’t figure out why I am getting this error.

fruits=(“apple”,“banana”)

print(fruits[1])

print(fruits[2])

You are using tuple to store the items and index od tuples or any other such data type in python starts from zero.So there are two elements in your tuple,one at index 0 and other at index 1 and when you are trying to access index2, there is nothing there, so this raises an error.

You can use remove function() to remove an element that you specify in parentheses,here is an example

friends list

friends = [‘joey’, ‘monica’, ‘racheal’, ‘ross’,’chandler’,’phoebe’]

‘ross’ is removed

friends.remove(‘ross’)

You can use python -m pip install selenium in Python36 folder(or whatever version you are using at the time) and then try in PyCharm by selecting the corresponding interpreter in settings or else use PyCharm to do the installation by itself.

You need to define the class before you use it.Here is how :
Class animal:
def out():
print(“Here is an animal”)
s = animal()
s.out()

Python does not support increment operators such as ++ or --.But here is a shorter way to achieve this.

For increamen use : x +=1

How to install Matplotlib?

To install the Matplotlib library, you need to open the Anaconda prompt.
Use the command : conda install matplotlib
Or if you want to install Matplotlib in the Anaconda environment then use this command
pip install matplotlib
Then import the package import matplotlib.pyplot as plt

the website you provide is not installing the anaconda now how can we download it

Hello Learner,
Thank you for reaching out to us.Please write to us at academy@greatlearning.in. We will look into this matter for you and will get back to you as soon as possible.

I am facing this issue ,Can someone help me with this ? Python error: string index out of range python

What does %s mean in Python? And what does the following bit of code do?
%s is used to format the string syntax and it was taken from C.