Мне кажется, что у вас ошибка отступа , в этом случае вам нужно убедиться, что при вводе чего-либо в функции l oop, или class , что он имеет правильный отступ.
v1 = []
v2 = []
while True:
print('Welcome to vector arithmetic! Below is a list of available operations.')
print('1. Enter values for your vectors')
print('2. Print vectors')
print('3. Vector dimensionality')
print('4. Add vectors')
print('5. Compute dot product of vectors')
print('6. Compute magnitude of vectors')
print('7. Quit')
choice = int(input('Enter the number corresponding to your choice: '))
if choice == 7:
break
elif choice == 1:
pass
elif choice == 2:
pass
elif choice == 3:
pass
elif choice == 4:
pass
elif choice == 5:
pass
elif choice == 6:
pass
else:
print('Invalid choice, try again')
Кроме того, я не рекомендую вам использовать break в циклах, поскольку они могут быть проблемными c, если они не реализованы должным образом. Вместо этого попробуйте использовать quit