Special Numbers
You only like numbers that start with an odd digit.Anil gives you space-separated integers as input.Your task is left-rotate every number in the list(if required) So that it can be liked by you.
Note:
If there is no odd digit in the number, do not rotate it.
If a number starts with an odd digit, do not rotate it.
Input
The first line of input contains space-separated integers.
sample input1
21 503 256 550 86 979 281
sample output1
12 503 562 550 86 979 128
sample input2
2001 463 6219 669 473 1006 77734 110 20511
sample output2
1200 346 1962 966 734 1006 77734 110 51120
Separate Faulty Items
Jeff Ordered several items from an online shop.After receiving the order, he found that some were faulty.So, he wants to separate the faulty items from the rest.
You are given the prices of the items jeff ordered, where a negative sign indicates a faulty item.Write a program to shift the prices of all the faulty items to the left without changing the relative order of the input.
Input
The first line of input contains space separated integers.
sample input1
11 -12 13 -14 15 16
sample output1
-12 -14 11 13 15 16
sample input2
21 11 -3 -2 9
sample output2
-3 -2 21 11 9
Golden Scores
Write a program to print all the Golden Scores in the list by maintaining their relative order.
Note: The last score is always a golden score.
sample input1
4 5 1 3 2
sample output1
5 3 2
sample input2
9 8 10 12
sample output2
12
5. Create a class BasePlusCommissionEmployee
a. BasePlusCommissionEmployee class is a child class of CommissionEmployee. It should inherit all the attributes of CommissionEmployee class and add its own attribute baseSalary.
b. Create a method called calculateTotalEarning which should inherit super class method calculateCommission and add baseSalary in it.
c. Create a method called displayData which should display the FirstName, LastName, Age, Address, ContactNumber, EmployeeID, OrganizationName, Position and totalEarning.
6 Create a complete class diagram of Question-01. Show relationship/inheritance between class.
(the #292598 is the first part and #292608 is the second part of this question and this is their part so I am requesting that to answers number 6 please also include part 1 and 2 of this question. thank you :)
4. Create a class SalariedEmployee
a. SalariedEmployee class is a child class of Employee class. It should inherit all the attributes of
Employee class and add its own attribute baseSalary.
b. Create a method called CalculateNetSalary which should deduct 13% Provisional Tax, 1%
insurance and 3% Fed Tax from baseSalary and display the NetSalary.
c. Create a method called displayData which should display the FirstName, LastName, Age,
Address, ContactNumber, EmployeeID, OrganizationName, Position, baseSalary and
NetSalary.
1. Create a class Person
a. Initialize a class Person (Constructor method) with FirstName, LastName, Age, Address and Contact Number.
2. Create a class Employee
a. employee is a Person so Employee is a child class of Person class. Employee class
constructor/__init__ method will contain all the attributes of Person class and Employee
class own attributes which are EmployeeID, OrganizationName and Position
3. Create a class CommissionEmployee 15 Marks
a. CommissionEmployee is a child class of Employee class. It should inherit all the attributes of Employee class and its own attribute which is commissionRate
b. Create a method called calculateCommission, which should take input of gross sale from the user and based on the commission rate calculate the totalEarning.
c. Create a method called displayData which should display the FirstName, LastName, Age, Address, ContactNumber, EmployeeID, OrganizationName, Position, commissionRate and totalEarning.
Convert the Number
Given a number having ten digits, convert it to a string following the below-mentioned rules.
Rules for conversion:
1.separate the number into a set of four-three-three digits
2.Use the following prefixes for successive digits
a.Single numbers: just read them separately
b.Two consecutive numbers: double
c.Three consecutive numbers: triple
d.Four consecutive numbers: quadruple
Input
The first line of input is a string of ten digits.
Sample Input1
9887666668
sample Output1
nine double eight seven triplesix double six eight
Sample Input2
9090407368
Sample Output2
nine zero nine zero four zero seven three six eight
You can use a minus sign to make a negative number like -2. What happens for each of the following and why?
>>> 2++2
>>> 2--2
>>> 2+-2
>>> 2-+2
Write a program named Admission for a college’s admissions office. The user enters a numeric high school grade point average (for example, 3.2) and an admission test score (for example, 75). Display the message "Accept" if the student meets either of the following requirements:
A grade point average of 3.0 or higher, and an admission test score of at least 60
A grade point average of less than 3.0, and an admission test score of at least 80
If the student does not meet either of the qualification criteria, display "Reject".
CAT-6 twisted pair cable is a commonly used computer networks cable that provides a frequency bandwidth of up to 250 MHz. It is suitable for most varieties of Ethernet over twisted pair up to 1000 BASE-T (Gigabit Ethernet). Determine whether a signal-to-noise ratio (SNR) of 20 dB is adequate to transmit 0.9 Gbps on this cable?