Warning
This page is located in archive.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
courses:be5b33prg:homeworks:character_equations [2016/01/25 09:34]
xposik created
courses:be5b33prg:homeworks:character_equations [2016/01/25 09:41]
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.txt · Last modified: 2016/01/25 09:41 by xposik