Answer:
here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// function to alphabetize the input string
void alphabetize(string &str)
{
// find the length of string
int n=str.size();
for(int x=0;x<n;x++){
for(int y=x+1;y<n;y++)
{
//swap the character
if(str[x]>str[y]){
char ch=str[x];
str[x]=str[y];
str[y]=ch;
}
}
}
cout<<"alphabetize string is: "<<str<<endl;;
}
int main()
{// string variable to read input
string inp;
cout<<"Please Enter a String in lowercase :";
//reading the input
cin>>inp;
// call function with inp argument
alphabetize(inp);
return 0;
}
Explanation:
Declare a variable "inp" of string type and assign the input string to it. call the alphabetize() function with argument "inp".In the alphabetize(),find the length of input string.Then travers the string and if a character is greater than any next character in the string then swap it, so that all the character are sorted.
Output:
Please Enter a String in lowercase :helloworld
alphabetize string is: dehllloorw
Answer:
The solution code is written in Python.
- play_list = [2, 4, 6, 8, 10]
- play_list[0] = 2 * play_list[len(play_list) - 1]
-
- print(play_list)
Explanation:
Firstly, we create a non-empty list, <em>play_list</em>, and fill it up with five random integers (Line 1).
To associate the new value with the first element of the list, we use expression play_list[0]. The index 0 address to the first element of the list.
Next, we use expression, len(play_list) - 1 to get the last index of the list and use that calculated last index to take out the last element and multiply it with 2. The result of multiplication is assigned to the first element, play_list[0] (Line 2).
When we print the list, we shall get
[20, 4, 6, 8, 10]
Answer:
Make a goal
Explanation:
She could make a goal achieve it and reward herself. Do this multiple times and she will be done
Answer:
link the chart, itll immediately update
I think it's true not sure sorry if it's wrong