Saved Bookmarks
| 1. |
Write a program to display your school name,class and section in python |
|
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)
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.) |
|