Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
damsel in distress
#1
Hi everyone

Basically my husband is a developer and uses Python. With father`s day approaching I came up with an idea of a t shirt with child/parent classes printed on it, using my husbands and daughters names, I remembered my husband trying to explain it to me one day, hence the idea.
Now I spent best part of the day reading through forums and watching tutorials, and Im still baffled by what the code should look like. All I want is couple of simple lines of code, including first and last name, so e.g. husbands name is John Smith, daughter`s name is Jane Smith. From what I understood I start with
class Smith
def _init_(self and here I have no idea what follows but all i want is for this to print John Smith

then the child class is class Jane (Smith) and again all I want is to have Jane Smith printed under John

Hope that makes sense. I won`t be running that code anywhere, it will just be printed on a t shirt, still, I would like it to be correct lol

Hope someone can help!

Cheers, Marta
Reply


Messages In This Thread
damsel in distress - by martav - Jun-06-2018, 08:41 PM
RE: damsel in distress - by micseydel - Jun-07-2018, 02:20 AM
RE: damsel in distress - by martav - Jun-09-2018, 06:26 AM
RE: damsel in distress - by Nwb - Jun-12-2018, 03:13 PM
RE: damsel in distress - by martav - Jun-13-2018, 05:42 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020