Create a variable "marks" and assign any number. If the marks are greater than 60, then print "Pass," else print "Fail."
Take two numbers and check if both numbers are odd or not. If they are both odd, then print "Odd," otherwise print "Even."
Take four variables, "a," "b," "c," and "d," and assign their values in the following way: a = b, b = c, c = d, d = a. Check the output.
Print the 2's table using the ** operator. Use any logic, but it should print the 2's table.
Check the output of the following expressions and validate your answers:
2+5*10-20**2
20/5*10+10
Take a number and check if the number is odd or not. If the number is odd, then print "Yes," else print "No."
Take a number and check if the number is divisible by 10 and 5. If it is divisible, then print "Yes," else print "No."
Take a number and check if multiplying the number by 20 makes it 100 or not. If it does, then print "Yes," else print "No."
Calculate your 10th percentage and print "Pass" or "Fail." If the marks are more than 70, then print "Pass," else print "Fail."
Take your age and check if your age is greater than 21. If it is, print "Adult," else print "Minor."
Convert a if-else solution to ternary operator solution. So, instead of using if-else, use the ternary operator.
Implement mark-sheet logic
Take a field "percentage"
If percentage is >= 80 then print "Distinction"
If percentage is >= 60 and < 80 then print "First division"
If percentage >= 33 and < 60 then print "Second division"
if percentage < 33 then print "Fail"
Write a logic to find the maximum of 2 numbers
Write a logic to find maximum of 3 numbers