Different output for same codes

Hi all,
I’am going through the task “Hacking the Fender” on my Python 3 course.
Can anyone please tell me why I have the different outputs while running the same code.
I just screenshot between my working area and the video from Project Walkthrough.

Many thanks

The code on the images is too small. Could you post larger images or the code, please?

I’ve already done this project and the reason why the output is different is because the video is 3 years old and during the course of this time they may have made a few edits to the csv file so that’s why the output now is different.

1 Like

if you want you can use my code for reference. im posting it below.

import csv

compromised_users=

with open(‘passwords.csv’) as password_file:

password_csv = csv.DictReader(password_file)

for password_row in password_csv:

#print(password_row)

compromised_users.append(password_row['Username'])

print(compromised_users)

with open(“compromised_users.txt”, “w”) as compromised_user_file:

for compromised_user in compromised_users:

compromised_user_file.write(compromised_user)

import json

with open(“boss_message.json”, “w”) as boss_message:

boss_message_dict={“recipent”:“The Boss”, “message”:“Mission Success”}

json.dump(boss_message_dict, boss_message)

with open(“new_passwords.csv”, “w”) as new_passwords_obj:

slash_null_sig="""


/ )( \ / _) / ( _)

) / ( ( (_ ( O ) )(

_/ _/ _/ (__)


/ )( \ / _\ / __)( / )( __)( \

) __ (/ ( (__ ) ( ) _) ) D (

_)(/_/_/ _)(_)()(_/

    ____  __     __   ____  _  _ 

___ / ___)( ) / _\ / ___)/ )( \

() _ / (// \___ ) __ (

   (____/\____/\_/\_/(____/\_)(_/

( ( / )( ( ) ( )

/ /) / (/ (// (/\

_))_/_/__/

“”"

::squints::
It appears that you’ve ended up at 2nd Ave. on the F train.

1 Like