XIInfo Pract H Y 301
XIInfo Pract H Y 301
General Instructions:
(i) All questions are compulsory.
(ii) Programming language: Python
(iii) This paper consists of 4 pages.
______________________________________________________________________________
1)a) Explain IPO cycle with the help of a block diagram of computer organization. [1]
c) Rajesh download a Puzzle game on his laptop. He was prompted with 2 options “Run” and [1]
“Save” the file. He clicked on “Run” , some files processed and launched the game . Can you
identify which of the following files helped Rajesh to launch the game.
i) Puzzle.txt
ii) Puzzle.dll
iii) Puzzle.exe
b) Write a program to convert the time entered as minutes to Hours : Minutes format. [1]
Example :
Enter the time in minutes: 66
Hours : Minutes
1 : 6
e) Rewrite the following code in python after removing all syntax error(s). [2]
Underline each correction done in the code.
a,b=10=10
c=a+b
While c=<20:
print(c , End = “*”)
c+=10
3)a) Fill in the blanks to execute loop from 10 to 100 and 10 to 1 [1]
i) for I in range (___________):
print(i)
ii) for I in range(____________):
print(i)
L=[90,"Saamil",67,"Raashid",100,"Raj"]
for i in range(len(L)):
if i%2==0:
print(L[i])
e) Write a program to input any string with space and convert lowercase to uppercase and vice [2]
versa. And space must be replaced with ‘@’.
Page 2 of 4
Example : Enter the string : OOB gemsedu
Converted string: oob@GEMSEDU
4a) Write a program to accept a first name, middle name and Last name of an employee and [1]
display only the first letter of first and middle name with complete last name as shown in the
below example.
Example :
Enter Name : Raj Kumar Sharma
Output : R.K.Sharma
str=”Hello Python”
print(str)
print(str[0])
print(str[2:8])
print(str[3:])
print(str*2)
print(str+”string”)
a=”informatics4.com”
for i in range(len(a)):
if (a[i].isalpha()):
print(a[i-1],end=’’)
if (a[i].isdigit()):
print(a[i],end=’’)
5)a) Write a program to input a sequence of numbers from a user and find the largest number . [2]
Example :
Enter the elements : [5,20,100,34,78,99]
Largest Number : 100
b) Rahul has executed the following code to retrieve the position “Saahil” in the given list. Help [2]
Rahul to search the position of “Saahil”.
L=[“Abhiram”,”Aadil”,”Basheer”,”Saahil”,”Furqan”]
Page 3 of 4
c) Write a menu driven program to enter the price of each item in a list. If the customer pays 500 [3]
AED , then the bill should generate as shown below.
Example:
************BILL*************
Number of items: 3
Item of highest price: 100
Total: 245
Balance: 255
************************************
Page 4 of 4