Added code for lecture 2026-11-10
This commit is contained in:
parent
5b630435ae
commit
07b9e54bf0
52 changed files with 1248 additions and 1 deletions
16
lecture20261110/if/if03.py
Normal file
16
lecture20261110/if/if03.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
# if..else statement example
|
||||
x = 7
|
||||
print(f"{x} is equal to 7?")
|
||||
if x == 7:
|
||||
print("Yes")
|
||||
else:
|
||||
print("No")
|
||||
|
||||
# if..else statement example
|
||||
x = 5
|
||||
print(f"{x} is equal to 7?")
|
||||
if x == 7:
|
||||
print("Yes")
|
||||
else:
|
||||
print("No")
|
||||
Loading…
Add table
Add a link
Reference in a new issue