Created
May 1, 2021 18:16
-
-
Save JuniorMSG/f25f1d5b5a08750d55b641ca18c8a55f to your computer and use it in GitHub Desktop.
python_if_statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def Q_9498(): | |
score = int(input()) | |
if score >= 90: | |
print("A") | |
elif 80 <= score < 90: | |
print("B") | |
elif 70 <= score < 80: | |
print("C") | |
elif 60 <= score < 70: | |
print("D") | |
else: | |
print("F") | |
def Q_2884_02(): | |
a, b = map(int, input().split()) | |
x = a * 60 + b - 45 | |
print(x // 60 % 24, x % 60) | |
return | |
def con_if(): | |
pt = upt.print_util("True & False") | |
num1 = 1 #true | |
num2 = 0 #false | |
lis1 = [1,2,3,4] | |
tup1 = (1,2,3,4) | |
str1 = "String" | |
dic1 = {"name":"ms", "age":18} | |
strList = [] | |
data = [] | |
strList.append('num1 and num2'); data.append(num1 and num2) | |
strList.append('num1 or num2'); data.append(num1 or num2) | |
strList.append('not num1'); data.append(not num1) | |
strList.append('1 in lis1'); data.append(1 in lis1) | |
strList.append('1 not in lis1'); data.append(1 not in lis1) | |
strList.append('1 in tup1'); data.append(1 in tup1) | |
strList.append('1 not in tup1'); data.append(1 not in tup1) | |
strList.append('"S" in str1'); data.append("S" in str1) | |
strList.append('"S" not in str1'); data.append("S" not in str1) | |
strList.append('"name" in dic1'); data.append("name" in dic1) | |
strList.append('"name" not in dic1'); data.append("name" not in dic1) | |
pt.print_list(strList, data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment