Python Forum
Help naming functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help naming functions
#1
For my assignment, it says to "create a string called Q1 with a word, and then create a function called Q2 that loops through and prints each character in Q1."

I can label Q1 and have it run correctly. I can make my next section loop through and prints each character in Q1, but I can't label it "Q2" without it messing up.

I have attached an image of what I have done that works and then naming it and messing it up.

My apologies for my terminology. I've only been at this for about 2 days lol.

I appreciate anything in advance! I'm sure it's something easy that I'm missing.    
Reply
#2
Q2(). To call a function you follow the function name with parenthesis. Just like you did with print().
Reply


Forum Jump:

User Panel Messages

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