Python 3 Error

Asked 2 years ago, Updated 2 years ago, 19 views

print ("green is 120")
print ("Yellow Green is 110")
print ("92 in red")

x = int (input ("Please enter a Provence rating"))
y = int (input ("Enter the number of farm-related articles"))
x = x + y * 1.25
print("National Production:", x)
x = x / 5
print("Low Volume:", x)
x = x / 2
print ("Number of conscripted military units:", x)
x = x * 15
print("Military Number:", x)

I don't know why I'm having a problem.
I can't change it to .exe. What's the problem?
SyntaxError: invalid syntax It appears in cmd like this

python

2022-09-22 18:42

2 Answers

The editor you used does not seem to support standard input/output such as the input() function.

It works well with online editors such as https://repl.it/languages/python3, so check it out again


2022-09-22 18:42

The following issues occur:


2022-09-22 18:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.