Answer:
Check the explanation
Explanation:
The Python program that frequently asks the user what pets the user has,
until the user enters "rock", in which case the loop ends can be analysed in the written codes below.
'''
# count of pets
count = 0
# read the user input
pet = input()
# loop that continues till the user enters rock
# strip is used to remove the whitespace
while pet.strip() != 'rock':
# increment the count of pets
count += 1
# output the pet name and number of pets read till now
print('You have a %s with a total of %d pet(s)' %(pet.strip(),count))
pet = input() # input the next pet
#end of program
Answer:
The International Centre for Integrated Mountain Development (ICIMOD) is a regional intergovernmental learning and knowledge sharing centre serving the eight regional member countries of the Hindu Kush Himalayas: Afghanistan, Bangladesh, Bhutan, China, India, Myanmar, Nepal, and Pakistan.
The Master Slide is the design template or design theme used for the slides within your presentation. There are three different master slides—notes master, handout master, and the most common, the slide master. All are located under View > Master.
John has 200 more socks than Johnny
Answer:
int main() {
int n;
cout<<"Enter the integer n"<<endl;
cin>>n;
if(n<1 || n>10)
{
while(n>10 || n<1)//taking input if the number is not within range..
{
cout<<"Enter the number again"<<endl;
cin>>n;
}
activity(n);//calling activity with the n..
}
return 0;
}
Explanation:
Above written is the main function in which a prompting an integer between 1 and 10 if it is not within range then again taking input.Then after that calling activity with n as argument.