create an array (26) and then use for loop to:
1. assign to its elements the English letters from A to Z.
2. print the letters on a Message boxes.
Create a console application for the department to record information for students who receive bursaries in the department. For each recipient you need to store the recipient’s name and the number of hours outstanding. Most new recipients start with 90 hours, but there are some exceptions. As recipients works in the department, the number of hours left needs to be updated (decreased) from time to time, based on hours already worked. Implement class Recipient which has private attributes for Name and Hours. Create two constructors, one with a default allocation of 90 hours for a recipient, and the other should accept the number of hours for a recipient. In addition to the constructors, the class should have the following methods:
public string getName()
//Returns the name of the recipient
public int getHours()
//Returns the hours outstanding
public void setHours(int H)
//Set the hours outstanding
public void displayRecipient()
//Display the name and number of hours left for a recipient
In the application class (main method in the program.cs file), do the following:
Create three instances of Recipient, for Xola, David and Sandy. Xola and Sandy will start
with 90 hours, while David starts with 60 hours.
Change the number of hours outstanding, after each have worked the following number of
hours
o Xola – 20 hours
o David – 10 hours
o Sandy – 16 hours
Use the displayRecipient() method to display the names and hours left for each
Recipient
Create a console application for the department to record information for students who receive bursaries in the department. For each recipient you need to store the recipient’s name and the number of hours outstanding. Most new recipients start with 90 hours, but there are some exceptions. As recipients works in the department, the number of hours left needs to be updated (decreased) from time to time, based on hours already worked. Implement class Recipient which has private attributes for Name and Hours. Create two constructors, one with a default allocation of 90 hours for a recipient, and the other should accept the number of hours for a recipient. In addition to the constructors, the class should have the following methods:
Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.
Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.
input: python learning
output:16-25-20-8-15-14 12-5-1-18-14-9-14-7Explanation
For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".
Numbers in String - 1
Given a string, write a program to return the sum and average of the digits of all numbers that appear in the string, ignoring all other characters.
input:Anjali25 is python4 Expert
output:11
3.67
Explanation:
For example, if the given string is "I am 25 years and 10 months old", the digits of all numbers that appear in the string are 2, 5, 1, 0. Your code should print the sum of all digits(8) and the average of all digits(2.0) in the new line
Numbers in String - 1
Given a string, write a program to return the sum and average of the digits of all numbers that appear in the string, ignoring all other characters.
Input
The input will be a single line containing a string
Please provide proper answer
Composite Numbers in the range
You are given two integers M, N as input. Write a program to print all the composite numbers present in the given range (including M and N).
Input
The first line of input is an integer M. The second line of input is an integer N.
Explanation
In the given example, the composite numbers present in the range between
2 to 9 are 4, 6, 8, 9.So, the output should be
4
6
8
9
Sample Input 1
2
9
Sample Output 1
4
6
8
9
Sample Input 2
1
4
Sample Output 2
4
Smallest Missing Number
Given a list of numbers, write a program to print the smallest positive integer missing in the given numbers. Input-The input will be a single line containing numbers separated by space. Output-The output should be a single line containing the smallest missing number from given numbers. Explanation-For example, if the input numbers are 3, 1, 2, 5, 3, 7, 7.
The number 1, 2, 3 are present. But the number 4 is not. So 4 is the smallest positive integers that is missing from the given numbers.
Multiples of 3
You are given N inputs. Print the numbers that are multiples of 3.
Input
The first line of input is an integer N. The next N lines each contain an integer as input.
Explanation
In the given example, there are
6 inputs. 1, 2, 3, 5, 9, 6. The numbers 3, 9, 6 are multiples of 3. So, the output should be
3
9
6
Sample Input 1
6
1
2
3
5
9
6
Sample Output 1
3
9
6
Sample Input 2
4
1
3
6
8
Sample Output 2
3
6