Lab 3
Lab 3
LAB # 03
CONSOLE INPUT AND OUTPUT
OBJECTIVE:
Taking input from user and controlling output position.
EXCERCISE:
A. Point out the errors or undefined/missing syntax, if any, and paste the output also in
the following python programs.
1. print (“Hello\bWorld!”)
CODE:
OUTPUT:
CODE:
OUTPUT:
3. age = 23
Print (message)
CODE:
OUTPUT:
CODE:
OUTPUT:
CODE:
OUTPUT:
3. n1=int(input(“enter n1 value’))
N2=int(input(“enter n2 value’))
CODE:
OUTPUT:
CODE:
OUTPUT:
2. Write a program that asks the user what kind of food they would like. Print a message about
that food. Such as “let me see if I can find you a Chowmein”. Food name must be in up
percase.(hint: use upper () for food name)
CODE:
OUTPUT:
3.Take the marks of 5 courses from the user and calculate the average and Percentage, display the
result.
CODE:
OUTPUT: