Maths test program

I have written this simple program that is a basically a maths test. I would like to know is there any areas I can improve on and if I have any bad habits that would be useful to break now. I realise I could have written this in the main class, but I was trying … Read more

Math workout program

This is a program where you are asked what operation you would like (addition, subtraction etc), what range of numbers you’d like, and then it creates an exercise then it asks you for the answer. Feel free to comment about anything. It is my first time showing my code to other people so it’s bound … Read more

Rails controller for a vocabulary quiz

I’m new to refactoring and I have just refactored an old Rails project that had bloated controller methods. I spun off the bloated methods into its own separate controller following this logic, since the quiz functionality can be considered a separate resource compared to the vocab controller’s responsibilities (Single Responsibility Principle). Please critique my refactored … Read more

Haskell Arithmetic Quiz

I’m currently learning Haskell, and as one of my first “proper” programs have created a mathematics quiz. It works like this: A question is generated, with two numbers from 1 to 10 which need to be either added, multiplied or subtracted, for example 3 * 6. The question is presented to the user, and they … Read more

Multiplication Exercise Generator

I’m new to programming in Python, and I am trying to create a multiplication exercise generator. I’ve got the following code for the solution, but I’m wondering if there is any more elegant solutions than this one. Note: I have not covered lists, tuples, or dictionaries as of yet so I’m using the absolute basics … Read more

Quiz application with tkinter

I am making a quiz app using tkinter in Python. I will be having a database that will have questions and options to display in application. Is it good to structure the program as shown, or should it be re-structured in some other way? import tkinter as tk def iQuiz(source,row=0,column=0,rowspan=None,columnspan=None): storeObj=tk.Frame(source,bg=”powder blue”) storeObj.grid(row=row,column=column,rowspan=rowspan,columnspan=columnspan) return storeObj … Read more