subject

Selection challenges 1 1. Write a Python program to accept two integers and check whether they are equal or not. Test Data : 15 15
Expected Output : Number1 and Number2 are equal

2. Write a Python program to check whether a given number is even or odd.
Test Data : 15
Expected Output : 15 is an odd integer

3. Write a Python program to check whether a given number is positive or negative. Test Data : 15
Expected Output : 15 is a positive number

4. Write a Python program to find whether a given year is a leap year or not.
Test Data : 2016
Expected Output : 2016 is a leap year.

5. Write a Python program to read the age of a candidate and determine whether it is eligible for casting his/her own vote.
Test Data : 21
Expected Output : Congratulation! You are eligible for casting your vote.

6. Write a Python program to read the value of an integer m and display the value of n is 1 when m is larger than 0, 0 when m is 0 and -1 when m is less than 0.
Test Data : -5
Expected Output : The value of n = -1

7. Write a Python program to accept the height of a person in centimeter and categorize the person according to their height. Test Data : 135
Expected Output : The person is Dwarf.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:20
What’s resistance in an electrical circuit ?
Answers: 1
question
Computers and Technology, 22.06.2019 04:40
Amain idea is supported, explained, or expanded on with a numbers b. a concluding statement c. details d. a topic sentence. im e paragraphs reset nex next
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately
Answers: 2
You know the right answer?
Selection challenges 1 1. Write a Python program to accept two integers and check whether they are...
Questions
Questions on the website: 13722363