Argv tool seems do not work correctly

Hello!

Opening file filename fails when getting the filename from the argv tool. What is wrong I do not now.

import sys
print("Сколько вам лет?", end=' ')
age = input()
print("Какого вы роста?", end=' ')
height = input()
print("Сколько вы весите?", end=' ')
weight = input()

print(f"Итак, вам {age} лет, ваш рост - {height} и ваш вес - {weight}.")

script, filename = sys.argv

txt = open(filenme)

The error is filename not defined

Any ideas?

Could it be this typo?

1 Like

Yes, in fact. Thank You.

1 Like
A free service run by Zed A. Shaw for learncodethehardway.org.