Paste
Copy
Cut
Options

¡Tu solución está lista!

Nuestra ayuda de expertos desglosó tu problema en una solución confiable y fácil de entender.

Mira la respuesta
  • Pregunta: 2. To test an algorithm that classifies whether a number is prime or not, the number 379 has been assigned as input value. If the number is prime the algorithm returns the expression "Prime", otherwise "Not prime". Based on the input value entered, which of the following statements is true? a. The algorithm returns "Prime" because 379 is only divisible by 1

    2. To test an algorithm that classifies whether a number is prime or not, the number 379 has been assigned as input value. If the number is prime the algorithm returns the expression "Prime", otherwise "Not prime". Based on the input value entered, which of the following statements is true? a. The algorithm returns "Prime" because 379 is only divisible by 1 and itself.
     b. The algorithm returns "Prime" because 379 is only divisible by 1, 3, and itself. 
    C. The algorithm returns "Not prime" because 379 is divisible by 1, 7 and itself.
     d. The algorithm returns "Not prime" because 379 is divisible by 1, 9 and itself. OR OR

    student submitted image, transcription available below

    Muestra el texto de la transcripción de la imagen
  • Chegg Logo
    Esta es la mejor manera de resolver el problema.
    Solución

    " If the number is prime the algorithm returns the expression "Prime", otherwise "Not prime". Based on the input value entered " So there are t

    Mira la respuesta completa
    answer image blur
Texto de la transcripción de la imagen:
Pregunta(s) pendiente(s) por contestar: 3,4,5, 2. Para probar un algoritmo que clasifica si un número es primo o no, se le ha asignado como valor de entrada el número 379. Si el número es primo el algoritmo entrega la expresión "Primo", en caso contrario "No primo". De acuerdo con el valor de entrada ingresado, ¿Cuál de las siguientes afirmaciones es verdadera? a. El algoritmo entrega "Primo" porque 379 solo es divisible por 1 y por el mismo. b. El algoritmo entrega "Primo" porque 379 es solo divisible por 1, 3 y por el mismo. C. El algoritmo entrega "No primo" porque 379 es divisible por 1, 7 y por el mismo. d. El algoritmo entrega "No primo" porque 379 es divisible por 1, 9 y por el mismo. O O