The Richest person
Input:
4
Jonncena 10000
Jane 2000
Jack 4000
Tom 4000
Output:
Jack 2
given a sentence write a program rotate all the words left so that every word starts with a vowel.
note: if there is no vowel in the word do not rotate it.
sample input:
I saw a DRAGON flying in the sky
sample output:
I aws a AGONDR ingfly in eth sky
given a square matrix print the sum all diagonal elements of the matrix
sample input :
3
1 2 3
4 5 6
7 8 9
sample output:
25
given a list of numbers find and print the first number that occurs only once in the list and the first number that occurs more than once in the list
sample input 1:
5 5 4 7 4 1 11
sample output 1:
7
5
sample input 2:
1 2 3 4 5 6 7 8 9
sample output 2:
1
None
by Rhea Tortor
You task is to write a program that will continuously add friend data to a list named friends until the user enters "No". The program must display the contents of friend list.
friend's data to be collected:
Last name
First name
Birthdate
Gender
Contact No.
Validation:
Name must not be empty.
Must check the validity of the birth date.
Gender either F or M only.
Contact No. must be exactly 11 digits.
Display "Invalid input!" and ask the user to input another value.
Input
Friend's data
Tortor
Rhea
12/25/1990
F
09172345678
NoOutput
Name:·Rhea·Tortor
Birthdate:·December·25,·1990
Gender:·Female
Contact·No.:·09172345678by Rhea Tortor
You task is to write a program that will continuously add friend data to a list named friends until the user enters "No". The program must display the contents of friend list.
friend's data to be collected:
Last name
First name
Birthdate
Gender
Contact No.
Validation:
Name must not be empty.
Must check the validity of the birth date.
Gender either F or M only.
Contact No. must be exactly 11 digits.
Display "Invalid input!" and ask the user to input another value.
Input
Friend's data
Tortor
Rhea
12/25/1990
F
09172345678
NoOutput
Name:·Rhea·Tortor
Birthdate:·December·25,·1990
Gender:·Female
Contact·No.:·09172345678For example, if the given numbers are 5, 3, 7, 2. As 7 is the greatest among the four numbers, so the output should be 7.
Maximum
You are given
N number of inputs. Print the maximum of them after each input.Input
The first line of input is an integer
N. The next N lines each contain an integer as input.Explanation
In the example, you are given
6 inputs 1, 0, 3, 2, 9, 8.
1 is maximum in the input 1.
1 is maximum in the input 1, 0.
3 is maximum in the input 1, 0, 3.
3 is maximum in the input 1, 0, 3, 2.
9 is maximum in the input 1, 0, 3, 2, 9.
9 is maximum in the input 1, 0, 3, 2, 9, 8.
So, the output should be
1
3
3
9
9
input
4
10
9
8
7
output should be
10
9
9
9
1. Create a class Restaurant, the __init__ (self, Name, Country, City, BranchNumber, CuisineType) method for restaurant should store restaurant name, country, city, its branch number and cuisine type.
2. Create a method DescRestaurant that prints the name, Country, City, BranchNumber and Cuisine type of the restaurant.
3. Create a method RestaurantTiming, the method should print out the opening and closing time of the restaurant.
4. Create two instances of the class Restaurant with two different Names, Country, City, BranchNumber and CuisineType then call the DescRestaurant and RestaurantTiming method for each instance.
program to check wether character is uppercase or lowercase alphabet