Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lfa:2023:coding-style [2023/11/06 16:05] mihai.udubasa [Redundant and trivially simplifiable code] |
lfa:2023:coding-style [2023/11/06 16:07] (current) mihai.udubasa [Example code] |
||
---|---|---|---|
Line 130: | Line 130: | ||
<hidden> | <hidden> | ||
<code python> | <code python> | ||
- | inport time # this import is not used | ||
- | |||
def f(): | def f(): | ||
x = 1 # this value is never used | x = 1 # this value is never used | ||
Line 147: | Line 145: | ||
else: | else: | ||
return False | return False | ||
- | + | ||
h = lambda x: x + 1 # use a more easily readable function def | h = lambda x: x + 1 # use a more easily readable function def | ||
Line 365: | Line 363: | ||
Here are some small examples of possible code submissions for a very simple task, one which is penalised, one which recieves regular points and one which also recieves a bonus. | Here are some small examples of possible code submissions for a very simple task, one which is penalised, one which recieves regular points and one which also recieves a bonus. | ||
- | The given task is to create a module | + | TODO: decide task and give example code |