from sys import argv
script, number1, number2 = argv
print("Here is your 1st number: ", number1)
print("Here is your 2nd number: ", number2)
product = number1 * number2
print(f"Here is your product: {product}")
number3 = int(input("Enter your number: "))
last_ans = number3 * product
print(f"Here is your final product times {number3}: ", last_ans)
I am a beginner in Python..
Without the error message, it is difficult to answer. The first thing I see is that
sys.argv
contains character strings, not numbers. If you want to use them as numbers, you need to convert them first, for example
>>> int("32")
32
>>> float("32")
32.0
Please say also the python version.
It's important because, for instance, the format string used in your code does not work with python < 3.6.
For those using 3.5 (as provided in debian) this is the working code
from sys import argv
script, number1, number2 = argv
# see the previous reply
number1 = int(number1)
number2 = float(number2)
#
print("Here is your 1st number: ", number1)
print("Here is your 2nd number: ", number2)
product = number1 * number2
#~ print(f"Here is your product: {product}")
print("Here is your product: {}".format(product))
number3 = int(input("Enter your number: "))
last_ans = number3 * product
#~ print(f"Here is your final product times {number3}: ", last_ans)
print("Here is your final product times {}: ".format(last_ans))