Hello I am new to python and I am having trouble with this simple program that I am writing.
import random
x = random.randint(0,100)
y = random.randint(0,100)
z = random.randint(0,100)
def calcavg(value1, value2,value3):
total = (value1 + value2 + value3)/3
return total
avg = calcavg(x,y,z)
print(f" The Average of{x},{y}, and {z} is {avg}.")
On The last line of the code I am getting a syntax error on the {avg}.")
print(...). Or are you using Python 3 < 3.6? That would result on a syntax error withprint(f".."). I cannot reproduce any error on Python 3.8.f"hello {name}") were introduced in Python 3.6.