Hello again, this repository contains all the coding question that were asked in the second CS worksheet
I have posted the files in the following order:
Python program to:
i. To find the square and cube of a given number.
ii. To accept a date from the user and check if it is valid or not.(Leap year condition yy%100==0 and yy%400==0 or ((yy%100)!=0 and (yy%4==0))
iii. To print your name five times using repetitive operator.
iv. To accept a character from the keyboard and determine whether it is a vowel or not.If the given character is a vowel print(“It is a vowel”) otherwise print(“it is not vowel”)
v. To find the greatest of three numbers.
vi. To accept a number from the user and check if the number is even or odd.
vii. To accept a number from the user and check if the number is positive or negative.
viii. To check if the person is eligible to vote or not.
ix. To accept a number and check if it is divisible by 5 or not .If the number is divisible by 5 then add 5 to it else subtract 2 from it.
x. To input marks in 5 subjects like English, maths, physics, chemistry, computer. Find the total and percentage of the marks. Assume 100 as maximum marks of each subject.If percentage is more than 85 display the message “Grade A” and if it is less than 50 then display “need to work hard” and for others display message “can do better”.
UPDATE: I'VE POSTED ALL THE CODES SEPERATELY.. DON'T WORRY THE CODES ARE TESTED AND THEY RUN PERFECTLY YES DO KEEP IN MIND THAT I'VE LEFT SOME TRADEMARK STYLES OF MINE, IN SEVERAL PRINT COMANNDS OF THE THE PART (8) SO CAREFULLY EDIT IT...
UPDATE 1.4: THERE WAS ALSO A QUESTION TO CORRECT THE CODE. HENCE I'VE ADDED THE CORRECTED CODE. ENJOY!...