Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 6 páginas
Examen

EGR 1400 Exam 1 QUESTIONS & ANSWERS(RATED A+)

Document preview thumbnail
Vista previa 2 fuera de 6 páginas

In C#, you can simulate rolling two dice by selecting a random number between 1 and 6 to represent each die roll and then adding them together to get the dice total. Let,s say that we developed a program to do this and we rolled the pair of dice 50 times and recorded the results of each roll on a sheet of paper. Can we just select one random number between 2 and 12 and achieve the same experimental results for the 50 rolls as rolling two die and adding them? a. No, It's not possible to get the same experimental results with one random number b. Yes, using the same scaling as before c. Yes, if the Visual C# code is written to scale the single random number between 2 and 12 d. Yes, if the random number is selected using myRand.Next(2,13); - ANSWER No, It's not possible to get the same experimental results with one random

Vista previa del contenido

EGR 1400 Exam 1 QUESTIONS &
ANSWERS(RATED A+)
In C#, you can simulate rolling two dice by selecting a random number between 1 and 6
to represent each die roll and then adding them together to get the dice total. Let,s say
that we developed a program to do this and we rolled the pair of dice 50 times and
recorded the results of each roll on a sheet of paper. Can we just select one random
number between 2 and 12 and achieve the same experimental results for the 50 rolls as
rolling two die and adding them?

a. No, It's not possible to get the same experimental results with one random number
b. Yes, using the same scaling as before
c. Yes, if the Visual C# code is written to scale the single random number between 2
and 12
d. Yes, if the random number is selected using myRand.Next(2,13); - ANSWER No, It's
not possible to get the same experimental results with one random number

What property of a Label control would you need to set to change the words displayed
in the Label on the form?

a. the Text property
b. the Name property
c. the Captain property
d. the Word property
e. None of these - ANSWER a. the Text property

Which of the following is the best name for a text box that will hold a person's age within
a Visual Studio .NET project, keeping in mind the recommended naming conventions?

a. Form1
b. txtAge
c. txtText1
d. Age
e. None of the above - ANSWER b. txtAge

When the user clicks a button, ______ is raised.

a. an event
b. a setting
c. a method
d. a property - ANSWER a. an event

Which if the following statements will set RandNum to a value between 1 and 3,
inclusive?

, a. RandNum = myRand.Next(1,3);
b. RandNum = myRand.Next(0,3);
c. RandNum = myRand.Next(1,4);
d. RandNum = myRand.Next(0,4);
e. None of these - ANSWER c. RandNum = myRand.Next(1,4);

What is the value of float.Parse("3.8").ToString("0.00")?

a. 3.8
b. 3.80
c. 4
d. 03.80
e. None of the above - ANSWER b. 3.80

What does the following expression result in:
txtText1.Text = txtSalary.Text + txtBonus.Text + txtOvertime.Text;
Given that the values entered for txtSalary is 400, txtBonus is 50 and txtOvertime is 0

a. 450
b. 40050
c. 400500
d. 4500
e. 400 - ANSWER c. 400500

What does the following expression result in (myVar is an integer with int myVar = 0;):
myVar = int.parse(txtSalary.Text) + int.parse(txtBonus.Text) +
int.parse(txtOvertime.Text);
Given that the values entered for txtSalary is 400, txtBonus is 50 and txtOvertime is 0

a. 450
b. 40050
c. 400500
d. 4500
e. 400 - ANSWER a. 450

Which of the following statements declare the variables a and b as type integer?

a. a = 0: b = 0;
b. int a; b=0;
c. int a & b;
d. int a, b;
e. None of these - ANSWER d. int a, b;

Which of the following correctly demonstrates continuing a string on a second line in the
code window to keep the code in one screen instead of scrolling to the right?

Información del documento

Subido en
1 de marzo de 2026
Número de páginas
6
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$16.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
shantelleG
4.0
(118)
Vendido
650
Seguidores
369
Artículos
18317
Última venta
2 días hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes