Python Forum
[split] No Error, and No Output
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] No Error, and No Output
#1
Hi Guys I am a beginner with Python, I am trying to execute a code, it says no error. But I am not getting the expected output. Can someone please help with it ?
students = []


def get_students_titlecas():
    for student in students:
        get_student_titlecase = student.title()
        return get_student_titlecase


def print_student_title_case():
    student_titlecase = get_students_titlecas()
    print(student_titlecase)


def add_student(name, student_id=332):
    student = {"name": name, "student_id": student_id}
    students.append(student)

    student_list = get_students_titlecas()

    student_name = input("Enter the student name ")
    student_id = input("Enter the student ID ")

    add_student(student_name, student_id)

    print_student_title_case()
Reply
#2
1) Don't hijack someone else's thread. Especially if your question is completely unrelated to theirs.
2) You've got some functions, but never call them. A function that ran without being called would be worthless.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error with output djprasanna 1 509 Nov-28-2023, 06:40 PM
Last Post: deanhystad
  [split] Why is there an output of None akbarza 1 415 Nov-27-2023, 02:53 PM
Last Post: deanhystad
  How to "tee" (=split) output to screen and into file? pstein 6 1,288 Jun-24-2023, 08:00 AM
Last Post: Gribouillis
  How do I split the output? AnunnakiKungFu 2 1,739 Feb-25-2021, 11:13 PM
Last Post: AnunnakiKungFu
  How to Split Output Audio on Text to Speech Code Base12 2 6,782 Aug-29-2020, 03:23 AM
Last Post: Base12
  [split] Name error ktck001122 3 2,664 Sep-02-2019, 01:50 AM
Last Post: ktck001122
  [split] Python beginner: Weird Syntax Error mnsaathvika 1 2,094 Jul-22-2019, 06:14 AM
Last Post: buran
  [split] Name error/is not defined rajkiran 1 3,912 Dec-27-2018, 06:47 PM
Last Post: micseydel
  [split] Python error jazzy 1 2,117 Dec-20-2018, 07:35 PM
Last Post: nilamo
  [split] Web Crawler Error takaa 1 3,619 Feb-17-2017, 11:54 AM
Last Post: wavic

Forum Jump:

User Panel Messages

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