Computer Science, asked by harsh2910, 10 months ago

write a program to display your school name,class and section​ in python

Answers

Answered by Equestriadash
18

The following codes must be typed in script mode, saved and then executed.

CODE:

school = input("Enter your school name:")

Class = input("Enter your class:")

section = input("Enter your section:")

print("Your details are", school, "Class", class, "section", section)

OUTPUT:

\tt Enter\ your\ school\ n ame: Westchester High

\tt Enter\ your\ class: 11

\tt Enter\ your\ section: D

\tt Your\ details\ are\  Westchester\ High,\ Class\ 11,\ section\ D

NOTE: Care must be taken when typing "class". "Class" is a keyword in Python programming and will hence not be considered a variable. Capitalizing the first alphabet will change its state to that of a variable (as done in the code.)

Answered by alnaabramosa
3

Explanation:

write write a program to display your name and school school

Similar questions