• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 21 páginas
Examen

Java Coding activities 2023 with complete solution

Document preview thumbnail
Vista previa 3 fuera de 21 páginas

Java Coding activities 2023 with complete solution T1L1 Coding activity 1 Write a program to print your name to the center of the output screen import .Scanner; import .Math; class Lesson_1_Activity_One { public static void main(String[] args) { Sln(" Hello"); Sln(" Carlos"); } } T1L1 Coding activity 2 Write a program to print your name to the center of the output screen on three different lines import .Scanner; import .Math; class Lesson_1_Activity_Two { public static void main(String[] args) { Sln(" Car "); Sln(" Los"); Sln(" Jurado"); } } T1L1 Coding activity 3 Write a program to output the following: ******** *java* ******** import .Scanner; import .Math; class Lesson_1_Activity_Three { public static void main(String[] args) { Sln("********"); Sln(" java "); Sln("********"); } } T1L2 Coding activity 1 Print the following shape: / / import .Scanner; import .Math; class Lesson_2_Activity_One { public static void main(String[] args) { Sln ("/"); Sln ("/"); } }

Vista previa del contenido

Java Coding activities 2023 with complete solution
T1L1 Coding activity 1
Write a program to print your name to the center of the output screen
import java.util.Scanner;
import java.lang.Math;
class Lesson_1_Activity_One { public static void main(String[] args) {
System.out.println(" Hello");
System.out.println(" Carlos");
}
}
T1L1 Coding activity 2

Write a program to print your name to the center of the output screen on three different
lines
import java.util.Scanner;
import java.lang.Math;
class Lesson_1_Activity_Two { public static void main(String[] args) {
System.out.println(" Car ");
System.out.println(" Los");
System.out.println(" Jurado");
}
}
T1L1 Coding activity 3
Write a program to output the following:
********
*java*
********
import java.util.Scanner;
import java.lang.Math;
class Lesson_1_Activity_Three {
public static void main(String[] args) { System.out.println("********");
System.out.println(" java "); System.out.println("********");
}
}
T1L2 Coding activity 1
Print the following shape:
/\
\/
import java.util.Scanner;
import java.lang.Math;
class Lesson_2_Activity_One { public static void main(String[] args) {
System.out.println ("/\\");
System.out.println ("\\/");
}
}

,T1L2 Coding activity 2
Using only one "System.out.print" command, print the following quote. Make sure to
include the quote marks (") in your output.

"I do not fear computers. I fear the lack of them."
Isaac Asimov
import java.util.Scanner;
import java.lang.Math;
class Lesson_2_Activity_Two { public static void main(String[] args) {
System.out.println ("\"I do not fear computers. I fear the lack of them.\"\nIsaac Asimov");
}
}
T1L2 Coding activity 3
Write the code to output:

-
/\
||
\/
-
class Lesson_2_Activity_Three {
public static void main(String[] args) {
System.out.println (" _");
System.out.println (" / \\");
System.out.println ("| |");
System.out.println (" \\ _ /");
}
}
T1L3 Coding activity 1
Write the code to ask the user to enter their name and print the following message:
Hi ______, nice to see you.
import java.util.Scanner;
import java.lang.Math;
class Lesson_3_Activity_One { public static void main(String[] args) {
Scanner scan= new Scanner (System.in);
String n;
System.out.println ("What is your name?");
n = scan.nextLine();
System.out.println ("Hi " + n + ", nice to see you.");
}
}
T1L3 Coding activity 2
Write a program that asks the user for three names, then prints the names in reverse
order.

Sample Run:

, Please enter three names:
Zoey
Zeb
Zena
Zena
Zeb
Zoey
import java.util.Scanner;
import java.lang.Math;
class Lesson_3_Activity_Two {
public static void main(String[] args) {
Scanner scan= new Scanner (System.in);
String name1;
String name2;
String name3;
System.out.println ("Please enter three names:");
name1 =scan.nextLine();
name2 =scan.nextLine();
name3 =scan.nextLine();
System.out.println (name3+" "+name2+" "+name1);
}
}
T1L3 Coding activity 3
Write a program that will ask the user to enter an adjective and a name. Print the
following sentence, replacing the ______ with the words they entered.
My name is _____. I am _____.
import java.util.Scanner;
import java.lang.Math;
class Lesson_3_Activity_Three {
public static void main(String[] args) {
Scanner scan = new Scanner (System.in);
String name; String adjective;
System.out.println("Hi there. What is your name?");
name = scan.nextLine();
System.out.println("What adjective describes you?"); adjective = scan.nextLine();
System.out.println("My name is " + name + ". I am " + adjective + ".");
}
}
T1L4 Coding activity 1
Input two doubles and print them backward on the screen.
So if the user enters:
1.3 6.8
It should output:
6.8 1.3
import java.util.Scanner;
import java.lang.Math;

Información del documento

Subido en
12 de marzo de 2023
Número de páginas
21
Escrito en
2022/2023
Tipo
Examen
Contiene
Preguntas y respuestas
$11.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.
LECTMAGGY
3.3
(29)
Vendido
149
Seguidores
121
Artículos
6316
Última venta
2 meses 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