1
0
forked from tdwojak/Python2017

python scripts - github repository

This commit is contained in:
s45160 2017-12-02 15:27:46 +01:00
parent 733f26b9c7
commit 1e4aea4ff3
6 changed files with 26 additions and 2 deletions

View File

@ -4,7 +4,6 @@
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="python-scripts" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />

View File

@ -3,7 +3,6 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Python2017.iml" filepath="$PROJECT_DIR$/.idea/Python2017.iml" />
<module fileurl="file://$PROJECT_DIR$/../python-scripts/.idea/python-scripts.iml" filepath="$PROJECT_DIR$/../python-scripts/.idea/python-scripts.iml" />
</modules>
</component>
</project>

View File

12
labs03/task00.py Normal file
View File

@ -0,0 +1,12 @@
import requests
message = input('Enter a Message: ')
number = input('Enter the phone number: ')
payload = {'number': number, 'message': message}
r = requests.post("http://textbelt.com/text", data=payload)
if r.json()['success']:
print('Success!')
else:
print('Error!')

8
labs03/task01.py Normal file
View File

@ -0,0 +1,8 @@
lista = [1,2,3]
string = 'abc'
liczba = 4.55
print(id(lista))
print(id(string))
print(id(liczba))

6
labs03/task02.py Normal file
View File

@ -0,0 +1,6 @@
def alfaRange(x, y):
for i in range(ord(x), ord(y)):
yield chr(i)
for c in alfaRange('a', 'e'):
print(c)