Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to find a bug python

#Use the print statement, print is Your Friend
#see if you can fix the bug by using the print statement
pages = 0
word_per_page = 0
pages = int(input("Number of pages: "))
word_per_page == int(input("Number of words per page: "))
total_words = pages * word_per_page
#print("pages: ", pages)
#print("word_per_page: ", word_per_page)
#print("total_words: ", total_words )
Comment

python bug

#this is a small bug for beginners
first = [1, 2, 3, 4, 5]

print(first)
second = first
print(second)
second.append(6)
print(second)
print(first)

if first == second :
    print("bug! you will get hacked!")
Comment

PREVIOUS NEXT
Code Example
Python :: stdin and stdout python 
Python :: pdfs in django 
Python :: unpacking tuples in python 
Python :: from sklearn.metrics import confusion_matrix pred = model.predict(X_test) pred = np.argmax(pred,axis = 1) y_true = np.argmax(y_test,axis = 1) 
Python :: python walrus operator 
Python :: pandas flip x and y axis 
Python :: @methodclass in python 
Python :: if syntax in python 
Python :: import folder from another folder python 
Python :: How split() works in Python? 
Python :: tensorflow euclidean distance 
Python :: python last non-zero value in a list 
Python :: hello world in python 3 
Python :: shared SHMEM python 
Python :: how to query DNS records using python 
Python :: toolbar pyqt 
Python :: Passing Arrays to Methods 
Python :: Python How to make your application check for updates 
Python :: binary tree python implementation 
Python :: python get ids from array of objects 
Python :: dataFrame changed by function 
Python :: django pycharm 
Python :: função anonima python 
Python :: puthon for loop 
Python :: Python program to print all even numbers in a range 
Python :: all combinations 
Python :: python print 2d array as table 
Python :: python np.sum 
Python :: to get the number of unique values for each column 
Python :: open file in python 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =