Python 7 Levels, L2, Unit 9, Bool Data Type And Relational Operators

Powered By EmbedPress

Exercise 1:

a = 13
b = 14
c = (a > b) == False
print(type(c))
print(c)

Exercise 2:

number = int(input("Please input an even number:"))
result = number%2 == 0
print(result)

Homework:

kevin_c = 96
kevin_m = 89
kevin_e = 92
aaron_c = 83
aaron_m = 100
aaron_e = 93
kevin_sum = kevin_c + kevin_m + kevin_e
aaron_sum = aaron_c + aaron_m + aaron_e
result = kevin_sum > aaron_sum
print(result)

dahan1999

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts