LIVE-1: Basic programming & bug-fixing in Python (for AI)

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

SMALL ERROR: IN cell [19], in the line B[i, j] = A1[i, j] + A 2[i, j] worked without any errors as we have B=A1+A2 in cell [15]. This implies that we created B in the cell[15] and are simply overwriting it in cell[19]. If we did not have the line B=A1+A2 in cell [15], we would encounter and error in cell [19] as Python interpreter doesn't know what B is?
Anyways, the key lesson is the same: always allocate your variables before you use them in loops.

AppliedAICourse
Автор

Great Session sir, Learnt a lot about how to avoid making mistakes by reading through error messages and documentation.

NaveenDama
Автор

Thanks for this session. it is extremely helpful for us...Hope to see more such sessions like

subhodeepdas
Автор

Thanks for such a nice initiative during lockdown.
Eagerly waiting for the next session.
Kudos to Applied AI Team :)

sunilsrivastava
Автор

This was a great session ....please make all subsequent videos public

shubhamjain
Автор

Very useful session. Looking forward for next sessions

VinitNeogi
Автор

Hi, guys. This is really great course, you explain very clear, obvious, you love your work and teaching is yours. I will watch all your videos. One question regarding an example about rectangle. I think, the sides of rectangle may not be parallel to X and Y axes. It seems, you simplified it. IMHO.

yerjanbekabsattarov
Автор

Thanks Sir for this lessons.. I could not attend the live sessions but i will be watching all the videos in you tube for sure....Is it necessary to remember all the in built functions during programming or is it ok to take help from the internet

subhodeepdas
Автор

Sir,
I think rectangle 2 points trick will only work if the rectangle's sides are parallel with axes.
Else there can be infinite number of rectangles.

bhargav
Автор

The invalid syntax error at 1:23:45, is it showing in python3 or python2?

shubhamtalks
Автор

When should i watch these live videos after Sql (according to course) with the applied ai course or should i first learn complete applied ai course and then i need to watch it?

pavankumar
Автор

Sir, in Question:- Add two randomly generated NumPy 3D-matrices(tensor) using loops:-


A1 = np.random.rand(3, 4, 5)


A2 = np.random.rand(3, 4, 5)


(m, n, o) = A1.shape


B = np.zeros((3, 4, 5))

for i in range(m):
for j in range(n):
for k in range(o):
B(i, j, k) = A1(i, j, k) + A2(i, j, k)

print(B)


is giving this error....


File "<ipython-input-1-76c75788e2d6>", line 7
B(i, j, k) = A1(i, j, k) + A2(i, j, k)
^
SyntaxError: can't assign to function call



How to fix this error

hellosumitg
Автор

Hi sir, please do course on how to clear PCEP, PCAP, PCAPP certification exams, conducted by python institute.

sunagshetty
Автор

A1=np.random.rand(5, 4, 3)
A2=np.random.rand(5, 4, 3)
(r, c, x) = A1.shape;
B=np.zeros((5, 4, 3))
for i in range(r):
for j in range(c):
for k in range(x):

B[i, j, k]=A1[i, j, k]+A2[i, j, k]
print(B)
sir i have written the code like this given in assigenement is this correct plz let me know

pallapothubhargavramfromib
Автор

Hi Sir, I have tried to get rid of this error but unable to solve it still facing same error:


def FindPoint(cx, cy, r, px, py):
cx = float(cx);
cy = float(cy);
r = float(r);
px = float(px);
py = float(py);
cx, cy, r, px, py = input("Enter cx, cy, r, px, py:").split();
print(cx, cy, r, px, py);


import math
d = math.sqrt( (cx-px)**2 + (cy-py)**2 )
print(d);

if d<r:
print("p in c")
else:
print("p is not in c")

FindPoint(1, 2, 3, 4, 5);
Enter cx, cy, r, px, py:0.0 0.0 5.0 1.0 1.0
0.0 0.0 5.0 1.0 1.0




facing same error :



TypeError Traceback (most recent call last)
in <module>()
----> 1 FindPoint(1, 2, 3, 4, 5);

in FindPoint(cx, cy, r, px, py)
10
11 import math
---> 12 d = math.sqrt( (cx-px)**2 + (cy-py)**2 )
13 print(d);
14

TypeError: unsupported operand type(s) for -: 'str' and 'str'

saikumarlokas
Автор

Sir how can we make ds algos stronger parallely with the course do you guide us for it.

mohitsinghrathore
Автор

HOW DO YOU RATE IPYTHON WITH THE JUPYTER NOTEBOOK?

eddisonlewis
welcome to shbcf.ru