Ask coding questions

← Back to all posts
Need class help, new to programming
moonlitdeath (0)

Hello all, I am new to programing and my professior wants me to write 2 different codes one being "Write a program that will display the first letter of your name in a field of asterisks." and the other being: "Write a program that will take the add the current sales tax rate of Riverside, California (google it). The user of the program will be directed to enter any positive number that represents the total sales and the program will calculate the sales tax. The output will be the total sales tax charged and the total with the sales tax included. Be sure to enter the information using the standard notation for money. e.g. $12.00." and have no idea where to start with the psudo, flow, let alone the actual code, any help is appreciated

IcynDevz (764)

To make a class, just simply do

class Name:
  def __init__(self):
    # whatever 
  def bla():
    # whatever 

Note that classes don't have to be in this specific form.


what have you tried first?