aboutsummaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/.idea/workspace.xml23
-rw-r--r--Python/Beginner training/Tasks.py29
2 files changed, 38 insertions, 14 deletions
diff --git a/Python/.idea/workspace.xml b/Python/.idea/workspace.xml
index ec04b64..7b14add 100644
--- a/Python/.idea/workspace.xml
+++ b/Python/.idea/workspace.xml
@@ -2,10 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fa33c027-ed35-40de-9bbc-c9cf5acfc8e7" name="Default Changelist" comment="">
- <change afterPath="$PROJECT_DIR$/Beginner training/Game test.py" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/Python.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/Python.iml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Beginner training/Tasks.py" beforeDir="false" afterPath="$PROJECT_DIR$/Beginner training/Tasks.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@@ -32,7 +30,8 @@
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="ToolWindowRun.ShowToolbar" value="false" />
- <property name="last_opened_file_path" value="$PROJECT_DIR$/Beginner training/Game test.py" />
+ <property name="ToolWindowServices.ShowToolbar" value="false" />
+ <property name="last_opened_file_path" value="$PROJECT_DIR$/Beginner training/Tasks.py" />
<property name="restartRequiresConfirmation" value="false" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
@@ -53,7 +52,7 @@
</list>
</option>
</component>
- <component name="RunManager" selected="Python.Game test">
+ <component name="RunManager" selected="Python.Tasks">
<configuration default="true" type="CompoundRunConfigurationType">
<toRun name="Basic synthax config" type="PythonConfigurationType" />
<toRun name="2 Pets config" type="PythonConfigurationType" />
@@ -174,9 +173,9 @@
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
- <option name="SDK_HOME" value="C:\Users\kami0\AppData\Local\Programs\Python\Python37\python.exe" />
+ <option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Beginner training" />
- <option name="IS_MODULE_SDK" value="false" />
+ <option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/Beginner training/Tasks.py" />
@@ -200,16 +199,18 @@
<component name="ServiceViewManager">
<option name="allServicesViewState">
<serviceView>
- <option name="contentProportion" value="0.1038526" />
+ <option name="contentProportion" value="0.3296" />
<treeState>
<expand>
<path>
<item name="services root" type="e789fda9:ObjectUtils$Sentinel" />
- <item name="com.intellij.execution.services.ServiceModel$ServiceGroupNode@5fbdd309" type="7427dc5b:ServiceModel$ServiceGroupNode" />
+ <item name="com.intellij.execution.services.ServiceModel$ContributorNode@53a38bba" type="d2cb1801:ServiceModel$ContributorNode" />
</path>
</expand>
<select />
</treeState>
+ <option name="groupByServiceGroups" value="false" />
+ <option name="groupByContributor" value="true" />
</serviceView>
</option>
</component>
@@ -240,7 +241,9 @@
<map>
<entry key="MAIN">
<value>
- <State />
+ <State>
+ <option name="COLUMN_ORDER" />
+ </State>
</value>
</entry>
</map>
diff --git a/Python/Beginner training/Tasks.py b/Python/Beginner training/Tasks.py
index 873bde6..d60a8bf 100644
--- a/Python/Beginner training/Tasks.py
+++ b/Python/Beginner training/Tasks.py
@@ -65,7 +65,28 @@ def Factoriel():
print(final_int)
-Divide()
-Histogram()
-NumberMatrix()
-Factoriel() \ No newline at end of file
+def CaesarCypher():
+ while True:
+ key = input("Type a key: ")
+ msg = input("Type a message: ")
+
+ decoded = [] ; encoded = []
+ for c in msg:
+ decoded.append(c - key)
+ encoded.append(c + key)
+
+ print(end="Decoded message: ")
+ for c in decoded:
+ print(end=c)
+ print()
+
+ print(end="Encoded message")
+ for c in encoded:
+ print(end=c)
+
+
+#Divide()
+#Histogram()
+#NumberMatrix()
+#Factoriel()
+CaesarCypher() \ No newline at end of file