Mohd Irfan
CancelG
F
E
D
C
B
A
08. List Comprehensions
Problem: List Comprehensions Solution 1: Using for loop and if-else statement x = int(input()) y = int(input()) z = int(input()) n = int(input()) arr = [] for i in range(x + 1): for j in ra...
07. Write a function
Problem: Write a function Solution 1: Using if else statement def is_leap(year): if year % 400 == 0: return True elif year % 100 == 0: return False elif year % 4 == 0:...
05. Print Function
Problem: Print Function Solution 1: Using for loop if __name__ == '__main__': n = int(input()) for i in range(n): print(i+1, end='') Solution 2: Using while loop if __name__ ==...