repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# num_times_2=0

# def my_abs(num,num_times_2):
#   num_times_2=num*2
#   print('number times two in function',num_times_2)
#   if(num>=0):
#     return num
#   else:
#     return -num

# print('number times two in global',num_times_2)
# print(my_abs(-7,num_times_2))


# x=int(input('input a number:'))
# if x%2!=0:
#   print(x,'is odd')
# else:
#   if x>=50:
#     print(x,'is large even number')
#   else:
#     print(x,'is even')

def omit_else_clause(number):
  if x%2==0 and x>=50:
    return(str(x)+' is a large even number')
  elif x%2==0:
    return(x,'is an even number')
  else:
    return(x,'is an odd number')

x=int(input('input a number: '))
print(omit_else_clause(x))