Application
Development Using Python (18CS55)
Module 1
Application
Development Using Python (18CS55)
Module 1
1)
Find
the out put of following expressions
1) (5 - 1) * ((7 + 1) /(3 – 1))
2)'Alice'*5
3) -9 % 5
4)11//3
5)2 ** 8
6) spam * 4
7)15/2.0
8)'Alice'+42
2) Develop a Python program to find the
average of best two marks out of three marks taken as input. Use Exceptional
Handling if the input is not a number.
3) What
is the difference between range(10),range(0,10),and range(0, 10,1) in a for
loop?
4) Explain
the rules of precedence used by python to evaluate an expression?
5) Write a
short program that prints the numbers 1 to 10 using a for loop by using all the above ranges.
6) WAP to
find best of two test averages form the three tests.
7) List the
rules to declare variables? Explain 3 ways of declaring variables with an
example?
8) Distinguish
between break and continue statements with an example.
9)
Demonstrate with an example Print(), Input() and string replication.
10) Explain
elif , for, while, beak and continue statements in python with an example for
each.
11) Write a
python program to check whether a given no. is even or odd.
12) How can
we pass parameters in user defined functions explain with an example.
13) Explain
local and global scope with local and global variables.
14)
Demonstrate the concept of exception.
Implement a code which prompts
the user for Celsius temp , convert the temp to farenheat and print out the
converted temp by handling exceptions.
15) Explain
the types of errors with examples.
16) Write a
python program using try and except ,so that your program handles non numeric
input gracefully by printing the message and existing the program the following
shown to execution of the program
Enter
hours:20
Enter Rate:9
Error:
please enter numeric input
Enter hours:
forty
Error,
please enter numeric input
17) Explain
conditional execution ,alternative execution chained conditionals and nested
conditional with examples.
18) Explain
break and continue statement with examples in python.
19)
Write a program with a function computer
grade that takes score as its parameter and returns a grade as a string.
20) Write a
python program to find greatest of three numbers (without using and operator)
by getting three numbers through keyboard using functions.
21) WAP that
uses input to prompt a user for their name and than welcomes them.
22) Explain
str(),int(),float() functions with example.?
23) Explain
elif with an example program.?
24) WAP that
ask for a user name and password using continue statement.?
25) Discuss
the starting, stopping and stepping arguments to range() in python.
26) Discuss
Importing modules in detail.
27) Explain
def,none and return values and return statements in python.
28) Discuss
local and global scope .
29)WAP to
guess the number between 1 and 20 in python.
No comments:
Post a Comment