Answer:
- def is_prime(n):
- for i in range(2, n):
- if(n % i == 0):
- return False
- return True
-
- prime_truths = [is_prime(x) for x in range(2,101)]
- print(prime_truths)
Explanation:
The solution code is written in Python 3.
Presume there is a given function is_prime (Line 1 - 5) which will return True if the n is a prime number and return False if n is not prime.
Next, we can use the list comprehension to generate a list of True and False based on the prime status (Line 7). To do so, we use is_prime function as the expression in the comprehension list and use for loop to traverse through the number from 2 to 100. The every loop, one value x will be passed to is_prime and the function will return either true or false and add the result to prime_truth list.
After completion of loop within the comprehension list, we can print the generated prime_truths list (Line 8).
The programmer solves the problems of a user by expressing an algorithm in a programming language to make a program that can run on a computer.
Answer:
Miguel y Maru están muy cansados. - Miguel y Maru están cansadísimos
Felipe es muy joven. - Felipe es jovencísimo
Jimena es muy inteligente. - Jimena es inteligentísima
La madre de Marissa está muy contenta. - La madre de Marissa está contentísima
Estoy muy aburrido. - Estoy aburridísimo
Explanation:
In this activity we have to switch the statements to the absolute superlative of the expressions. In Spanish we can add the suffix -ísimo to an adjective to refer to the highest degree of something. It can be translated in ENglish to "really, extremely, super or quie". The statements in English are:
- Miguel and Maru are very tired - Miguel and Mary are extremely tired
- Felipe is very young - Felipe is super young
- Jimena is very smart - Jimena is really smart
- Marissa´s mother is very happy - Marissa´s mother is extremely happy
- I´m very bored - I´m super bored
Answer:
The answer is "A blank line".
Explanation:
The blank line initiates the interpreter to start examining the line of statements whenever the Python shell as well as the code block are used.
- It is also known as the line that has nothing but spaces or lines without texts or a line.
- It prints an empty sheet, which leaves its performance with such a blank line.