-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex_characteres.py
More file actions
45 lines (40 loc) · 1018 Bytes
/
index_characteres.py
File metadata and controls
45 lines (40 loc) · 1018 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
'''
s = input("please type some characteres and press enter: ")
for i in range(len(s)):
print(s[i])
print("Lucas")
'''
# string in order reverse of characteres lists
'''
s = input("please type some characteres and press enter:")
for i in range(len(s)):
print(s[i::-1])
print('hello')
'''
'''
s = input("please type some characteres and press enter: ")
for word in s.split():
print(word)
print('hello, how are you?')
'''
# código que determina se você gosta de algo semelhante
# sophus Lie
'''
activity = input("what do you like to do? ")
liesActivities = ['math', 'hike', 'walk', 'gymnastics']
if activity in liesActivities:
print('sophus like to do that , too!')
else:
print('Good for you!')
'''
s = input('please enter a list of integers: ')
lst = s.split()
containsEven = True
for element in lst:
x = int(element)
if x % 2 == 0:
containsEven = True
if containsEven:
print("The list contained an even number")
else:
print("The list did not contain an even number")