Definitely Chevy. I love chevys.
Answer:
Linux
Explanation:
Linux is a family of open source operating system and can be easily modified and changed to meet its particular requirements. Linux is one the most used operating systems on servers, mainframe computers and even super computers. Being a free and open source system, it can be modified and distributed for both commercial and non commercial by anyone under the terms of its licence.
<em>The</em><em> </em><em>characteristics</em><em> </em><em>of</em><em> </em><em>a</em><em> </em><em>modern</em><em> </em><em>computer</em><em> </em><em>are</em><em> </em><em>:</em>
- <em>Speed</em><em> </em>
- <em>Accuracy</em><em> </em>
- <em>storage</em><em> </em>
- <em>Automation</em><em> </em>
- <em>Communication</em><em> </em>
- <em>Versatility</em><em> </em>
- <em>Memory</em><em> </em>
- <em>Reliability</em><em> </em>
Answer:
def main():
n = int(input('Enter the value of the variable n:'))
k=2;
totalSum = 0
print('The list of the prime numbers are as follows:')
while k <= n:
totalSum = totalSum+is_prime(k)
k=k+1
print('Total sum of the prime numbers:',totalSum)
def is_prime(k):
primeNumber = 0
i=1
while i<=int(k):
if (k % i) == 0:
primeNumber = primeNumber + 1
i=i+1
if(primeNumber==2):
print(k)
return k;
else:
return 0;
main()
Explanation:
- Run the while loop until k is less than n.
- Determine if the variable k is prime then add it to the totalSum variable.
- Increment the value of k by 1.
- Create a function isPrime to check whether the number is prime or not by determining the factors of k which can be found using the modulus operator.
-
Call the main function at the end.