Sep-17-2018, 12:57 AM
I am a newbie and have a question. I am following a guide and typed a few line and ran with Python 3.7 on a Mac. When I run it some of the output prints the parenthesis. What and I doing wrong?
Here's the code:
I will now count my chickens:
('Hens', 30)
('Roosters', 97)
Now I will count the eggs:
7
Is it true that 3 + 2 < 5 - 7?
False
('What is 3 + 2?', 5)
('What is 5 - 7?', -2)
Oh, that's why its False.
How about some more.
('Is it greater?', True)
('Is is greater or equal?', True)
('Is it less or equal?', False)
I'm sure it's something stupid. Thank you in advance. Also if this is the wrong place to post please point me in the right direction.
Here's the code:
print("I will now count my chickens:") print("Hens", 25 + 30 / 6) print("Roosters", 100 - 25 * 3 % 4) print("Now I will count the eggs:") print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6) print("Is it true that 3 + 2 < 5 - 7?") print(3+2<5-7) print("What is 3 + 2?", 3+2) print("What is 5 - 7?",5-7) print("Oh, that's why its False.") print("How about some more.") print("Is it greater?" ,5>-2) print("Is is greater or equal?", 5>=-2) print("Is it less or equal?",5<=-2)Hers the run:
I will now count my chickens:
('Hens', 30)
('Roosters', 97)
Now I will count the eggs:
7
Is it true that 3 + 2 < 5 - 7?
False
('What is 3 + 2?', 5)
('What is 5 - 7?', -2)
Oh, that's why its False.
How about some more.
('Is it greater?', True)
('Is is greater or equal?', True)
('Is it less or equal?', False)
I'm sure it's something stupid. Thank you in advance. Also if this is the wrong place to post please point me in the right direction.