File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class prueba {
4
+ private int numero = 5 ;
5
+ public static void main (String [] args ) {
6
+ Scanner scan = new Scanner (System .in );
7
+ int num = scan .nextInt ();
8
+ System .out .println (num );
9
+ System .out .println ("Hola mundo!" );
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ import java.util.Scanner;
2
+
3
+ public class prueba {
4
+ private int numero = 5;
5
+ public static void main(String[] args) {
6
+ Scanner scan = new Scanner(System.in);
7
+ int num = scan.nextInt();
8
+ System.out.println(num);
9
+ System.out.println("Hola mundo!");
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ def leer_fichero (path :str )-> str :
2
+ try :
3
+ with open (path , 'r' ) as file :
4
+ contenido = file .read ()
5
+ return contenido
6
+ except FileNotFoundError :
7
+ print ("El archivo no existe." )
8
+ except PermissionError :
9
+ print ("No tienes permiso para leer el archivo." )
10
+ except Exception as e :
11
+ print ("Ocurrió un error:" , e )
You can’t perform that action at this time.
0 commit comments