forked from tdwojak/Python2017
python scripts - github repository
This commit is contained in:
parent
733f26b9c7
commit
1e4aea4ff3
@ -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" />
|
||||
|
@ -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>
|
12
labs03/task00.py
Normal file
12
labs03/task00.py
Normal 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
8
labs03/task01.py
Normal 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
6
labs03/task02.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user