Answer:
Explanation:
It has to do with collecting and utilizing data
Answer:
#include<iostream>
using namespace std;
void main()
{
int townA_pop,townB_pop,count_years=1;
double rateA,rateB;
cout<<"please enter the population of town A"<<endl;
cin>>townA_pop;
cout<<"please enter the population of town B"<<endl;
cin>>townB_pop;
cout<<"please enter the grothw rate of town A"<<endl;
cin>>rateA;
cout<<"please enter the grothw rate of town B"<<endl;
cin>>rateB;
while(townA_pop < townB_pop)//IF town A pop is equal or greater than town B it will break
{
townA_pop = townA_pop +( townA_pop * (rateA /100) );
townB_pop = townB_pop +( townB_pop * (rateB /100) );
count_years++;
}
cout<<"after "<<count_years<<" of years the pop of town A will be graeter than or equal To the pop of town B"<<endl;
}
Explanation:
Answer:
MyString= input('Enter string: ')
string_capitalize(MyString)
print(MyString)
def string_capitalize(str):
str= str.capitalize()
return str
Explanation:
This python code is learnt to access string value from users and capitalize all characters in the beginning of each sentence.