#1 Find whether the given number is odd or even: 0:23 #2 Find whether the given number ends with 0 or 5 or any other number 7:43 #3 Find the grade of students based on given marks 8:41 #4 Convert given flowchart into Python Code 20:22 my code: #1 i = int(input()) if(i%2 == 0): print('even') else: print('odd') #2 num = 0 if (num % 10 == 0): print(0) elif (num % 5 == 0): print(5) else: print('other') #3 marks = int(input()) if (marks >= 0 and marks =90): print('A') elif (marks >=80 and marks =70 and marks =60 and marks
@YasirKhan-mb1iy3 жыл бұрын
sir, which book is used for the tutorial? or if can suggest any good book for python,which have problems to solve with python?
@ojasmehrotra28212 жыл бұрын
For q2, is this method an efficient method to do the question or is it more prone to mistakes while programming? n1 = str(input("Enter a number- ")) n2 = n1[-1] if (n2 == '0'): print ('The number ends in 0') elif (n2 == '5'): print ('The number ends in 5') else: print ('Other output')
@raj_patel2 жыл бұрын
Thanks Bro
@MUTHU_KRISHNAN_K7 ай бұрын
Nice I think,we can even avoid mentioning the 'str' explicitly 😊👍
@sayanghosh69963 жыл бұрын
6:30 why do we need another if statement? Why cant we simply print num%10 ? Seems a simpler solution to me.
@armanbothra1183 ай бұрын
rint("enter a number") n=int(input()) if(n%5==0): print("number ends with 0 or 5") else: print("the number is not end with 0 or 5")
@thamizhan_on_yt2 жыл бұрын
What is the text editor you use sir?
@SSCTechInsights3 жыл бұрын
which key is used for right alignment of all the selected text ?
@PriyaSingh-ex8ps2 жыл бұрын
print('Travel Fron Indore To Delhi') Time=int(input("Enter maximum no of Hours you have to reach to Delhi ")) Time_Longer=8 if(Time
@nikulpd8137 Жыл бұрын
sir, for question 2 what if i do it like, a=str(input('enter the number: ')) if(a.endswith('0')): print('0') elif(a.endswith('5')): print('5') else: print('other') is it okay?
@MUTHU_KRISHNAN_K7 ай бұрын
Nice I think,we can even avoid mentioning the 'str' explicitly 😊👍
@kajukatli99852 жыл бұрын
#code by divyankpapa print('start') print('travelling from Bhopal to Delhi') time=int(input('enter travel time:')) #minimum travel time should be greater than 2 hours if(time>=2): if(time=3000): if(3000=150): if(150 =450): print('take train') else: print('invalid amount') else: print('invalid input') print ('thank you')
@054_nirajkumar33 жыл бұрын
थैंक्यू
@akarshk13 жыл бұрын
Whats up man I see your THANK YOU comment on every video LOL
@snehamukherjee98003 жыл бұрын
@@akarshk1 true XD
@MilanoMine200211 ай бұрын
Now are u in which term? Of iitm @@snehamukherjee9800
@DHEERAJSINGH-b9e2 ай бұрын
what is longer here??
@shayanchakraborty57613 жыл бұрын
Why am i getting a syntax error in the first if statement with the following code? Can anyone please point out the mistake? print("Enter the marks: ") marks=int(input()) ( if(90
@induvardhan_m3 жыл бұрын
Look at the open parenthesis before if block and make sure to use nested if only for the second check i.e, it works only for AND operations not for OR operations.
@induvardhan_m3 жыл бұрын
Look at the open parenthesis before if block and make sure to use nested if and only if there is a second check i.e, it works only for AND operations not for OR operations.
@ishu78912 жыл бұрын
you are using the else condition without its "if" part which will be if(marks>=0 and marks
@steveraphaelpulikottil57552 жыл бұрын
( not required before & ) " " after if statements, respectively