8th day of python challenges 105-110

This commit is contained in:
abd.shallal 2019-08-01 14:54:19 +03:00
parent dc946b9aba
commit 87e968da93
8 changed files with 210 additions and 161 deletions

View File

@ -52,6 +52,12 @@
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
<option value="W29" />
<option value="E501" />
</list>
</option>
</inspection_tool>

View File

@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7106b959-52c5-4d26-9f5a-8703a78c8c29" name="Default Changelist" comment="6th day of python challenges 88-94">
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-096.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-097.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-098.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-099.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-100.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-101.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-102.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges96-103/challenge-103.py" afterDir="false" />
<list default="true" id="7106b959-52c5-4d26-9f5a-8703a78c8c29" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/challenges105-110/challenge-105.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges105-110/challenge-106.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges105-110/challenge-107.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges105-110/challenge-108.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges105-110/challenge-109.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/challenges105-110/challenge-110.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
@ -22,80 +20,66 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-096.py">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-104.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="10" selection-end-line="1" />
<state relative-caret-position="165">
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="11" selection-end-column="24" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-097.py">
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-105.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" selection-start-line="1" selection-end-line="3" selection-end-column="22" />
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-098.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="22" selection-end-line="11" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-099.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" selection-start-line="10" selection-end-line="11" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-100.py">
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-106.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" lean-forward="true" selection-end-line="6" />
<caret line="6" column="12" selection-start-line="6" selection-start-column="12" selection-end-line="6" selection-end-column="12" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-101.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="26" selection-start-line="17" selection-start-column="26" selection-end-line="17" selection-end-column="26" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-102.py">
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-107.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="15" lean-forward="true" selection-end-line="1" />
<caret selection-end-line="1" selection-end-column="23" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-103.py">
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-108.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="11" selection-start-line="9" selection-start-column="11" selection-end-line="9" selection-end-column="11" />
<state relative-caret-position="75">
<caret line="5" column="33" selection-start-line="5" selection-start-column="33" selection-end-line="5" selection-end-column="33" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-109.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="15" selection-start-line="1" selection-start-column="15" selection-end-line="1" selection-end-column="15" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-104.py">
<provider selected="true" editor-type-id="text-editor" />
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-110.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="14" selection-start-line="12" selection-start-column="14" selection-end-line="12" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
</leaf>
@ -121,13 +105,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/challenges52-59/challenge-054.py" />
<option value="$PROJECT_DIR$/challenges52-59/challenge-055.py" />
<option value="$PROJECT_DIR$/challenges52-59/challenge-056.py" />
<option value="$PROJECT_DIR$/challenges52-59/challenge-057.py" />
<option value="$PROJECT_DIR$/challenges52-59/challenge-058.py" />
<option value="$PROJECT_DIR$/challenges52-59/challenge-059.py" />
<option value="$PROJECT_DIR$/challenges60-68/challenge-060.py" />
<option value="$PROJECT_DIR$/challenges60-68/challenge-061.py" />
<option value="$PROJECT_DIR$/challenges60-68/challenge-062.py" />
<option value="$PROJECT_DIR$/challenges60-68/challenge-063.py" />
@ -172,14 +149,20 @@
<option value="$PROJECT_DIR$/challenges96-103/challenge-102.py" />
<option value="$PROJECT_DIR$/challenges96-103/challenge-103.py" />
<option value="$PROJECT_DIR$/challenges96-103/challenge-104.py" />
<option value="$PROJECT_DIR$/challenges105-110/challenge-105.py" />
<option value="$PROJECT_DIR$/challenges105-110/challenge-106.py" />
<option value="$PROJECT_DIR$/challenges105-110/challenge-107.py" />
<option value="$PROJECT_DIR$/challenges105-110/challenge-108.py" />
<option value="$PROJECT_DIR$/challenges105-110/challenge-109.py" />
<option value="$PROJECT_DIR$/challenges105-110/Names.txt" />
<option value="$PROJECT_DIR$/challenges105-110/challenge-110.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="571" />
<option name="y" value="-4" />
<option name="width" value="932" />
<option name="height" value="1083" />
<option name="width" value="960" />
<option name="height" value="1084" />
</component>
<component name="ProjectId" id="1O5wfQ7DfSfe4iwhiOQ9ZxAmGlm" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
@ -198,12 +181,7 @@
<path>
<item name="paython-by-learn" type="b2602c69:ProjectViewProjectNode" />
<item name="paython-by-learn" type="462c0819:PsiDirectoryNode" />
<item name="challenges20-26" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="paython-by-learn" type="b2602c69:ProjectViewProjectNode" />
<item name="paython-by-learn" type="462c0819:PsiDirectoryNode" />
<item name="challenges96-103" type="462c0819:PsiDirectoryNode" />
<item name="challenges105-110" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
@ -245,7 +223,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Python.challenge-104">
<component name="RunManager" selected="Python.challenge-110">
<configuration default="true" type="PythonConfigurationType" factoryName="Python">
<module name="paython-by-learn" />
<option name="INTERPRETER_OPTIONS" value="" />
@ -268,17 +246,20 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="challenge-099" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="challenge-106" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="paython-by-learn" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges96-103" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges105-110" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges96-103/challenge-099.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges105-110/challenge-106.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="true" />
<option name="EMULATE_TERMINAL" value="false" />
@ -287,17 +268,20 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="challenge-101" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="challenge-107" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="paython-by-learn" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges96-103" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges105-110" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges96-103/challenge-101.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges105-110/challenge-107.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="true" />
<option name="EMULATE_TERMINAL" value="false" />
@ -306,17 +290,17 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="challenge-102" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="challenge-108" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="paython-by-learn" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges96-103" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges105-110" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges96-103/challenge-102.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges105-110/challenge-108.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="true" />
<option name="EMULATE_TERMINAL" value="false" />
@ -325,17 +309,17 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="challenge-103" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="challenge-109" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="paython-by-learn" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges96-103" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges105-110" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges96-103/challenge-103.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges105-110/challenge-109.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="true" />
<option name="EMULATE_TERMINAL" value="false" />
@ -344,17 +328,17 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="challenge-104" type="PythonConfigurationType" factoryName="Python" temporary="true">
<configuration name="challenge-110" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="paython-by-learn" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges96-103" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/challenges105-110" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges96-103/challenge-104.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/challenges105-110/challenge-110.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="true" />
<option name="EMULATE_TERMINAL" value="false" />
@ -365,11 +349,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.challenge-104" />
<item itemvalue="Python.challenge-103" />
<item itemvalue="Python.challenge-102" />
<item itemvalue="Python.challenge-101" />
<item itemvalue="Python.challenge-099" />
<item itemvalue="Python.challenge-110" />
<item itemvalue="Python.challenge-109" />
<item itemvalue="Python.challenge-108" />
<item itemvalue="Python.challenge-107" />
<item itemvalue="Python.challenge-106" />
</list>
</recent_temporary>
</component>
@ -388,23 +372,23 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-1" y="-4" width="1922" height="1085" extended-state="6" />
<frame x="0" y="-4" width="1920" height="1084" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24986821" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.12282551" />
<window_info id="Structure" order="1" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32925585" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" />
<window_info anchor="bottom" id="Version Control" order="7" weight="0.32925585" />
<window_info anchor="bottom" id="Educational.CheckDetails" order="8" />
<window_info anchor="bottom" id="Terminal" order="9" weight="0.32212028" />
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="11" visible="true" weight="0.22731906" />
<window_info anchor="bottom" id="Python Console" order="11" visible="true" weight="0.36087865" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@ -422,71 +406,13 @@
<MESSAGE value="54th day of python challenges 78-79" />
<MESSAGE value="5th day of python challenges 80-87" />
<MESSAGE value="6th day of python challenges 88-94" />
<option name="LAST_COMMIT_MESSAGE" value="6th day of python challenges 88-94" />
<MESSAGE value="7th day of python challenges 96-103" />
<option name="LAST_COMMIT_MESSAGE" value="7th day of python challenges 96-103" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/paython_by_learn$challenge_039.coverage" NAME="challenge-039 Coverage Results" MODIFIED="1563282890417" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/challenges35-44" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/challenges52-59/challenge-057.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="8" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges52-59/challenge-056.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" selection-start-line="5" selection-end-line="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges52-59/challenge-059.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
</state>
</provider>
</entry>
<entry file="file:///usr/lib/python3.6/turtle.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="215">
<caret line="106" selection-start-line="106" selection-end-line="106" />
<folding>
<element signature="e#4575#4595#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges60-68/challenge-060.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="6" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges60-68/challenge-061.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" selection-start-line="4" selection-end-line="6" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges60-68/challenge-062.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="16" selection-end-line="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges60-68/challenge-063.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="14" selection-start-line="4" selection-start-column="14" selection-end-line="4" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges60-68/challenge-064.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
@ -766,13 +692,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-102.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="15" lean-forward="true" selection-end-line="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-103.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
@ -780,8 +699,71 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-104.py">
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-102.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="11" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/Numbers.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/challenges96-103/challenge-104.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="24" selection-start-line="11" selection-start-column="24" selection-end-line="11" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-105.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-106.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="12" selection-start-line="6" selection-start-column="12" selection-end-line="6" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-107.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="1" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-108.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="33" selection-start-line="5" selection-start-column="33" selection-end-line="5" selection-end-column="33" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-109.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="15" selection-start-line="1" selection-start-column="15" selection-end-line="1" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/Names.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="5" selection-start-line="3" selection-start-column="5" selection-end-line="3" selection-end-column="5" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/challenges105-110/challenge-110.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="14" selection-start-line="12" selection-start-column="14" selection-end-line="12" selection-end-column="14" />
</state>
</provider>
</entry>
</component>
</project>

View File

@ -0,0 +1,3 @@
file = open('Numbers.txt', 'w')
file.write('1, 2, 3, 4, 5')
file.close()

View File

@ -0,0 +1,7 @@
file = open('Names.txt', 'w')
file.write('Abdullah\n')
file.write('Ahmed\n')
file.write('Ali\n')
file.write('Yaser\n')
file.write('Hasanen\n')
file.close()

View File

@ -0,0 +1,2 @@
file_open = open('Names.txt', 'r')
print(file_open.read())

View File

@ -0,0 +1,9 @@
file_open = open('Names.txt', 'r')
print(file_open.read())
file_open.close()
ask = str(input('Enter a name to add to file : '))
file_write = open('Names.txt', 'a')
file_write.write(file_write + '\n')
file_write.close()
file_open = open('Names.txt', 'r')
print(file_open.read())

View File

@ -0,0 +1,25 @@
count = 0
while count < 5:
print('1) Create a new file')
print('2) Display the file')
print('3) Add a new item to the file ')
selection_input = int(input('Make a selection 1, 2 or 3 : '))
if selection_input == 1:
file = open('Subject.txt', 'w')
subject_name = str(input('Enter school subject name : '))
file.write(subject_name + '\n')
file.close()
elif selection_input == 2:
file = open('Subject.txt', 'r')
print(file.read())
file.close()
elif selection_input == 3:
file = open('Subject.txt', 'a')
subject_name = str(input('Enter school subject name to add into file : '))
file.write(subject_name + '\n')
file.close()
count = count + 1
file = open('Subject.txt', 'r')
print(file.read())
file.close()

View File

@ -0,0 +1,15 @@
file = open('Names.txt', 'r')
print(file.read())
file.close()
file2 = open('Names2.txt', 'w')
file2.close()
ask = str(input('Enter one of names : '))
with open('Names.txt', 'rt') as myFile:
for myLine in myFile:
if myLine != ask:
file2 = open('Names2.txt', 'a')
file2.write(myLine + '\n')
file2.close()
myFile.close()
file = open('Names2.txt', 'r')
print(file.read())