Module1: Question Bank
Syllabus:
Why
should you learn to write programs, Variables, expressions and statements,
Conditional execution, Functions?
Part
A: Theory
- a. Discuss with example and diagrams, Why Should you learn to write Programs?b. Define Program. Differentiate between Compiler and Interpreter. Give Examples.c. With a neat diagram explain the High level definition of the parts of Hardware Architecture. Explain the role/Job of Programmer.
- a. With examples explain the following Six Building blocks of Programs: Input, Output, Sequential Execution, Conditional Execution, Repeated Execution and Reuse.b. Explain the following different types of errors: Syntax errors, Semantic errors and Logic Errors.
- Define the following with example : Values and Types , Variables , Expressions , Keywords , Statements , Operators and Operands, Order of Operations , Modulus Operators , String operations and Comments.
- Explain how to read the input from the user with example.
- Explain the following with examples
- Boolean Expression
- Logical Operators
- Conditional Execution : if
- Alternative Execution: if else
- Chained Conditionals : if elif else
- Nested Conditionals : if else if else
- Catching exception using try and except
- Short circuit evaluation of logical circuits
- Explain the following with example
- Functions
- Function Call
- Built in Function
- Type Conversion Functions
- Random Numbers
- Math Functions
- Adding new Functions
- Defining and using the new functions
- Flow of execution
- Parameter and Arguments
- Fruitful and void Functions
- Advantages of Functions
- Write a program that uses input to prompt a user for their name and then welcomes them.
- Write a program to prompt the user for hours and rate per hour to compute gross pay.
- Write a program to read the following input from user and display
- Name :
- USN :
- Roll NO:
- Mobile No:
- E-Mail id :
- Percentage of Marks :
- To find the simple interest for a given value P,T and R. The program must take the input from the user.
- To read two integers and find the sum , diff , mult and div .
- To check whether the number is positive using simple if .
- To check whether the given number is even or odd using simple if else.
- Write a program to prompt the user for hours and rate per hour to compute gross pay. Also to give the employee 1.5 times the hourly rate for hours worked above 40 hours.