Decision Making Task 1
Decision Making Task 1
3 Write a program to get a number from the user and print whether it is positive or negative.
4 Write a program that reads a floating-point number and prints "zero" if the number is zero. Otherwise, print
"positive" or "negative". Add "small" if the absolute value of the number is less than 1, or "large" if it exceeds
1,000,000.
5 Write a program that takes a number from the user and generates an integer between 1 and 7. It displays the
weekday name.
6 Write a program that requires the user to enter a single character from the alphabet. Print Vowel or
Consonant, depending on user input. If the user input is not a letter (between a and z or A and Z), or is a string
of length > 1, print an error message.
9 Write a program that accepts three numbers from the user and prints "increasing" if the numbers are in
increasing order, "decreasing" if the numbers are in decreasing order, and "Neither increasing or decreasing
order" otherwise.
10 Write a program that prompts the user to enter three names. Your program should display the names in
descending order.
11 Write a program to calculate the monthly telephone bills as per the following rule:
Plus Rs. 0.40 per call for any call beyond 200 calls.
13 Write a program that asks the user to enter 3 numbers in three variables and then displays the largest
number.
14 Write a program that asks the user to enter a number and displays whether entered number is an odd
number or even number.
15 A student will not be allowed to sit in exam if his/her attendance is less than 75%.
And print
a. Below 25 - F
b. 25 to 45 - E
c. 45 to 50 - D
d. 50 to 60 - C
e. 60 to 80 - B
f. Above 80 - A
17 A company decided to give bonus of 5% to employee if his/her year of service is more than 5 years.
Ask user for their salary and year of service and print the net bonus amount.
Develop a program for a flight booking system. Consider factors such as seat
availability, passenger age, and class preference. Use nested if statements to
determine if a booking is successful and calculate the ticket price.
46 Medical Diagnosis: