w3resource

Python: Display a sample examination schedule

Python Basic: Exercise-9 with Solution

Write a Python program to display the examination schedule. (extract the date from exam_st_date).

exam_st_date = (11, 12, 2014)
Sample Output: The examination will start from : 11 / 12 / 2014

Pictorial Presentation:

Display a sample examination schedule

Sample Solution:-

Python Code:

exam_st_date = (11,12,2014)
print( "The examination will start from : %i / %i / %i"%exam_st_date)

Sample Output:

The examination will start from : 11 / 12 / 2014

Flowchart:

Flowchart: Display a sample examination schedule

Visualize Python code execution:

The following tool visualize what the computer is doing step-by-step as it executes the said program:

Python Code Editor:

 

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a Python program to display the first and last colors from the following list.
Next: Write a Python program that accepts an integer (n) and computes the value of n+nn+nnn.

What is the difficulty level of this exercise?

Test your Python skills with w3resource's quiz



Python: Tips of the Day

Try-catch-else construct:

try:
  foo() 
except Exception: 
  print("Exception occured")
else:
  print("Exception didnt occur")
finally:
  print("Always gets here")