Commit 6f15d704 authored by Olivier Cornu's avatar Olivier Cornu
Browse files

Hello, World!

Dé-commenter les description pour afficher ces deux exemples dans l'UI.
parent 91a55d26
# -*- coding: utf-8 -*-
from pyromaths import ex
class HelloWorld(ex.TexExercise):
# Un-comment to show this exercise:
# description = u'Exemple HelloWorld'
def tex_statement(self):
return ['\\exercice', 'Hello, world!']
def tex_answer(self):
return ['\\exercice*', 'Hello, world corrigé!']
# -*- coding: utf-8 -*-
import random
from pyromaths import ex
class RandomHelloWorld(ex.TexExercise):
# Un-comment to show this exercise:
# description = u'Exemple RandomHelloWorld'
def __init__(self):
self.times = random.randint(2, 10)
def tex_statement(self):
return ['\\exercice', '%u times hello, World!' % self.times]
def tex_answer(self):
return ['\\exercice*', '%u times goodbye, World!' % self.times]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment