Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Technical test #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions calculator.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
"""
Your module documentation here
"""
#!/usr/bin/python
# -- coding: utf-8 --


class CalculatorClass(object):
"""
Your class documentation here
"""

def sum(self, num_list):
"""
Your method documentation here
"""
# your sum code here
return "not implement yet" # Remove this dummy line
class calculator_class:
def sumalista(listaNumeros):
laSuma = 0
for i in listaNumeros:
laSuma = laSuma + i
return laSuma
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
c = int(input("Enter third number: "))
d = int(input("Enter four number: "))
print(sumalista([a,b,c,d]))
21 changes: 21 additions & 0 deletions employee_jarsa.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,26 @@ CREATE TABLE employee_department (

CREATE TABLE employee_hobby (
);
ADD COLUMN first_name "char";

ADD COLUMN id bigint NOT NULL;

ADD COLUMN last_name "char";

INSERT INTO employee(first_name, last_name)
VALUES
(jorge, pinto);(rogelio,pedroza );
(pedro,gonzales );
(isac,rodriguez);

INSERT INTO employee_department(name, description)
VALUES
(belleza, algo de belleza);
(salud, salud y bienestar);
(limpieza, escobeas y trapeadores);
(gaming, videojuegos);
(electrodomesticos, estufas y lavadoras);
(electronica, laptops);
(telefonia, smartphones);

-- ...
48 changes: 37 additions & 11 deletions primes.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
"""
Your module documentation here
"""
#!/usr/bin/python


class PrimeClass(object):
def es_primo(numero):
"""
Your class documentation here

Funcion que determina si un numero es primo

Tiene que recibir el numero entero

"""

def is_prime(self, num_int):
"""
Your method documentation here
"""
# your primes code here
return "not implement yet" # Remove this dummy line
for i in range(2, numero):

if numero % i == 0:
return False

return True


while True:

try:

numero = int(raw_input("inserta un numero (0) salir >> "))

if numero == 0:
break

if es_primo(numero):

print
1

else:

print
0
except:

print
"\nEl numero tiene que ser entero"