Computer Science, asked by jadhavkirann2005, 8 months ago

write a program to print your school name in python.

Answers

Answered by parulsingh2005
19

Answer:

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:Enter your school name: Westchester High

\tt Enter\ your\ class:Enter your class: 11

\tt Enter\ your\ section:Enter your section: D

\tt Your\ details\ are\ Westchester\ High,\ Class\ 11,\ section\ DYour 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.)

Similar questions