CourseWare Wiki
Switch Term
Winter 2024 / 2025
Winter 2023 / 2024
Winter 2022 / 2023
Winter 2021 / 2022
Winter 2020 / 2021
Winter 2019 / 2020
Winter 2018 / 2019
Older
Search
Log In
old
courses
be5b33prg
homeworks
character_equations
Warning
This page is located in archive. Go to the latest version of this
course pages
.
Differences
This shows you the differences between two versions of the page.
View differences:
Side by Side
Inline
Go
Link to this comparison view
2016/01/25 09:41 xposik [Evaluation]
2016/01/25 09:37 xposik [Introduction]
2016/01/25 09:34 xposik created
Go
Next revision
Previous revision
2016/01/25 09:41 xposik [Evaluation]
2016/01/25 09:37 xposik [Introduction]
2016/01/25 09:34 xposik created
Go
courses:be5b33prg:homeworks:character_equations [2016/01/25 09:34]
xposik
created
courses:be5b33prg:homeworks:character_equations [2016/01/25 09:41]
(current)
xposik
[Evaluation]
Line 15:
Line 15:
which is a correct mathematical equation. It is also a Python expression which evaluates to ''True''.
which is a correct mathematical equation. It is also a Python expression which evaluates to ''True''.
-
-
**Further requirements for valid solutions:**
-
-
- The solution is a mutually unique assignement of digits and letters. The same letters always represent the same digits, different letters must represent different digits. E.g. if you decide that letter ''P'' represents digit ''6'', you have to substitute this digit for all the ''P''s in the equation, and also no other letter can represent digit ''6''.
-
- The first letters of all "words" (including single-character "words") cannot represent digit 0, since we usually do not write the initial zeros.
Another example of character equation may be the following puzzle and its solution:
Another example of character equation may be the following puzzle and its solution:
Line 25:
Line 20:
(J + O + I + N + T)**3 == JOINT
(J + O + I + N + T)**3 == JOINT
(1 + 9 + 6 + 8 + 3)**3 == 19683
(1 + 9 + 6 + 8 + 3)**3 == 19683
+
+
**Further requirements for valid solutions:**
+
+
- The solution is a mutually unique assignement of digits and letters. The same letters always represent the same digits, different letters must represent different digits. E.g. if you decide that letter ''P'' represents digit ''6'', you have to substitute this digit for all the ''P''s in the equation, and also no other letter can represent digit ''6''.
+
- The first letters of all "words" (including single-character "words") cannot represent digit 0, since we usually do not write the initial zeros. (In the first example above, neither ''A'', nor ''B'' can be 0. In the second example, no character can be zero, since all are part of single-character words.)
Published character equations usually have only a single solution. In general (and in this task in particular), this feature is not always fulfilled. We would like to find all possible solutions.
Published character equations usually have only a single solution. In general (and in this task in particular), this feature is not always fulfilled. We would like to find all possible solutions.
Line 113:
Line 113:
</code>
</code>
-
===== Evaluation =====
+
-
You should present the solution personally to a teacher. You can get up to 5 points for this task. 3 points will be awarded for function that works correctly, 2 points for the code quality. Be prepared to answer any question about your code.
+
You can further test your solution on the following character equations (only the number of solutions is provided):
You can further test your solution on the following character equations (only the number of solutions is provided):
Line 124:
Line 123:
</code>
</code>
+
+
===== Evaluation =====
+
You should present the solution personally to a teacher. You can get up to 6 points for this task. 4 points will be awarded for function that works correctly, 2 points for the code quality. Be prepared to answer any question about your code.
/**
/**
courses/be5b33prg/homeworks/character_equations.1453710849.txt.gz
· Last modified: 2016/01/25 09:34 by
xposik