Last active
August 29, 2015 14:08
-
-
Save z2s8/629f2d2572c19200c4da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
fagyosok = [] | |
for i in range(1, 8): | |
homerseklet = int(input('{0}. nap homerseklete: '.format(i))) | |
if homerseklet < 0: | |
fagyosok.append(i) | |
if len(fagyosok) > 0: | |
print('volt olyan nap, amikor fagypont alatti volt a homerseklet') | |
napsor = ', '.join(str(e) + '.' for e in fagyosok) | |
print('a {0} napon fagypont alatti volt a homerseklet'.format(napsor)) | |
else: | |
print('nem volt olyan nap, amikor fagypont alatti volt a homerseklet') | |
print('{0}-szor volt fagypont alatti a homerseklet'.format(len(fagyosok))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
mondat = input('mondat: ') | |
print('{0} betubol all'.format(len(mondat))) | |
print('7-15. betuk: {0}'.format(mondat[6:15])) | |
print('nagykezdobetus'.capitalize(), | |
'KiCsI'.lower(), | |
'nAgY'.upper(), | |
'ossze' + 'fuz' + 'es', | |
'Haromszor' * 3, | |
int('72'), | |
'axaxa'.count('a'), | |
'avtidrof'[::-1], | |
sep='\n') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. nap homerseklete: 32 | |
2. nap homerseklete: -24 | |
3. nap homerseklete: 138 | |
4. nap homerseklete: -73128 | |
5. nap homerseklete: 0 | |
6. nap homerseklete: 8 | |
7. nap homerseklete: -31 | |
volt olyan nap, amikor fagypont alatti volt a homerseklet | |
a 2., 4., 7. napon fagypont alatti volt a homerseklet | |
3-szor volt fagypont alatti a homerseklet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mondat: Syntax Error: invalid syntax | |
28 betubol all | |
7-15. betuk: Error: i | |
Nagykezdobetus | |
kicsi | |
NAGY | |
osszefuzes | |
HaromszorHaromszorHaromszor | |
72 | |
3 | |
forditva |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment