Answer:
The program in Python is as follows:
print("Enter a character followed by a phrase",end='')
word = input(": ")
char = word[0]
print("Occurrence: "+str((word.count(char))-1))
Explanation:
The prints an instruction to the user on how to input to the system
print("Enter a character followed by a phrase",end='')
This prompts and gets the user for input
word = input(": ")
This extracts the character from the input string
char = word[0]
This counts and prints the number of occurrence of the extracted character
print("Occurrence: "+str((word.count(char))-1))
The programming language to use here is not stated, so standard output is not clear. A solution using text boxes for input and output can be given in Delphi:
unit Unit2;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TForm2 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
procedure FormCreate(Sender: TObject);
private { Private declarations }
public { Public declarations }
end;
var Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
var i: integer;
txtline: string;
begin
i := StrToInt(edit1.text);
txtline := IntToStr(i) + ', ' + IntToStr(2 * i) + ', ' + IntToStr(i * i); edit2.text := txtline;
end;
end.
AltGr (also Alt Graph) is a modifier key found on many computer keyboards (rather than a second Alt key found on US keyboards). It is primarily used to type characters that are not widely used in the territory where sold, such as foreign currency symbols, typographic marks and accented letters.
The baby boomers is a type of demographic group. The demographic groups are usually categorized by age, income bracket, social class and so on. Baby boomers are classified as a generation of a group of people and also therefore, by their age range.