Loops are program statements that are repeated as long as the loop condition is true.
The loop in Python, where comments are used to explain each line is as follows:
#This initializes the number of pets to 0
count = 0
#This gets input for the pet name
pet = input("Pet: ")
#This is repeated until the user enters "rock"
while pet.lower() != "rock":
#This increases the number of pets by 1
count+=1
#This prints the pet and the number of pets
print("You have a",pet,"with a total of",str(count),"pet(s)")
#This gets input for the pet name
pet = input("Pet: ")
Read more about loops at:
brainly.com/question/19344465
Answer:
Bjarne Stroustrop published the first reference guide for C++
Explanation:
Bjarne Stroustrop is a computer scientist who created the C++ programming language while working at the AT&T Bell laboratory. He also published the first reference guide for the programming language.
In October 1985, the book, The C++ Programming Language, was published. It describes the c++ programming language and was the only documentation and reference guide for the programming language at the time. Newer editions have since been published.
Answer: File History
Explanation: File history is the history that gets created in the form of back-up that keeps the record of the stored files. It is used in protecting the files that is present on the system like desktop, libraries,etc.
It creates the duplicate records in the storage for any future use and it can also be restored easily.File history also facilitates with feature of deleting the unnecessary history afterward when the user wants.
Answer:
The statement in Python is:
print("The average pH of citrus fruits is ",avg_citrus_pH)
Java
System.out.print("The average pH of citrus fruits is "+avg_citrus_pH);
C++
cout<<"The average pH of citrus fruits is "<<avg_citrus_pH;
Explanation:
The programming language is not stated; so, I answered the question in 3 languages (Python, Java and C++)
Assume that avg_citrus_pH has been declared and initialized; all you need to do is invoke a print statement and then append the variable
In Python, use print()
In c++, use cout<<
In Java, use System.out.print()
So, the statements are:
Python:
print("The average pH of citrus fruits is ",avg_citrus_pH)
Java
System.out.print("The average pH of citrus fruits is "+avg_citrus_pH);
C++
cout<<"The average pH of citrus fruits is "<<avg_citrus_pH;
Virus.
A virus is a malicious program or script that Spreads.
Malware, however, will not spread.
Viruses can spread without a victim's permission because it is automated to do so.
For example, the Melissa virus would look like a file attachment that used reverse psychology to make you open it. From there, it goes through the first 50 email contacts stored on your computer and sends the virus to them from your computer.