Tell us what’s happening:
I’m just trying to make a simple Program to calculate one angle of triangle.I don’t understand my guilt
Please try to help me
Your code so far
One angle = input("Please type amount of 1st angle and Press Enter: ")
Two angle = input("Please type amount of 2nd angle and again Press Enter: ")
One angle = int(One angle)
Two angle = int(Two angle)
Result = One angle - Two angle
Constant = int(180)
print("3rd angle will be = ",Constant - Result)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
.
Link to the challenge:
I’m not a Python guy, but I can see the problem.
A variable name can’t be two words like “One angle”. A quick search finds:
Officially, variable names in Python can be any length and can consist of uppercase and lowercase letters ( A-Z
, a-z
), digits ( 0-9
), and the underscore character ( _
). An additional restriction is that, although a variable name can contain digits, the first character of a variable name cannot be a digit.
So, you cannot have spaces. Instead, try something like:
one_angle = input("Please type amount of 1st angle and Press Enter: ")
Or you could call it “angle_one” or “angle1”. It just has to be one word and obey the rules. Your code reads a variable (“One”) and then sees another one (“angle”) and doesn’t know why you have two variables in a row.
When I make that change to those two variables and do it all over the code, it works in a Python engine.
1 Like
Thank you so much.I’m new & really grateful to you