1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leviafan [203]
3 years ago
11

Develop a Python program. Define a class in Python and use it to create an object and display its components. Define a Student c

lass with the following components (attributes):  Name  Student number  Number of courses current semester
Computers and Technology
1 answer:
AlexFokin [52]3 years ago
8 0

Answer:

  1. class Student:
  2.    def __init__(self, Name, Student_Num, NumCourse):
  3.        self.Name = Name  
  4.        self.Student_Num = Student_Num  
  5.        self.NumCourse = NumCourse  
  6. s1 = Student("Kelly", 12345, 4)
  7. print(s1.Name)
  8. print(s1.Student_Num)
  9. print(s1.NumCourse)

Explanation:

Firstly, use the keyword "class" to create a Student class.

Next, create a class constructor (__init__) that takes input for student name, student number and number of course (Line 2) and assign the input to the three class attributes (Line 3-5). All the three class attributes are preceded with keyword self.

Next, create a student object (Line 7) and at last print all the attributes (Line 8-10).

You might be interested in
System memory is on a computer motherboard?
Leya [2.2K]
Is this a true or fales question

8 0
3 years ago
Read 2 more answers
Cmo se puede añadir amigo ??'
seropon [69]

Answer:ok

Explanation:

5 0
3 years ago
How do you recognize substances that have gone through physical or chemical changes?
Leviafan [203]
Normally  you can't.   You cannot tell if water has been frozen and then thawed.
7 0
3 years ago
Read 2 more answers
How many binary digits does a single hexadecimal digit represent?
Anna35 [415]
Four binary digits.  So letter D.


8 0
3 years ago
What describes Accenture's approach to automation?
kogti [31]

human center because we describe stuff by what we see and obserevs

4 0
3 years ago
Read 2 more answers
Other questions:
  • How do you tack pictures for this app
    15·1 answer
  • A law office has been leasing dark fiber from a local telecommunications company to connect a remote office to company headquart
    14·1 answer
  • The national highway system improved economic activity in Georgia by
    6·2 answers
  • Select the correct answer.
    10·1 answer
  • (1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output
    11·1 answer
  • Escribe un ejemplo de:• Software de aplicación. • Software de diagnóstico. • Software de sistema. ayudenme plis, me toca entrega
    10·1 answer
  • Anyone else like hunter x hunter?<br> lets talk abt it uwu<br><br> good day :)
    14·2 answers
  • What is the difference between RELIABLE and UNRELIABLE sources of<br> income?
    7·2 answers
  • Without using parentheses, enter a formula in cell F4 that
    11·1 answer
  • You have been working as a junior data analyst at Bowling Green Business Intelligence for nearly a year. Your supervisor, Kate,
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!