0% found this document useful (0 votes)
11 views2 pages

M1 Python Set 1 and 2

This document outlines a class test for the Basics of Python course at Mukesh Patel School of Technology Management & Engineering for the academic year 2024-2025. The test consists of three questions, with the first being compulsory, covering topics such as jump length in arrays, finding two indices that sum to a target, and string manipulation. Each question includes examples and specifies the marks allocated.

Uploaded by

Topchefoframen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

M1 Python Set 1 and 2

This document outlines a class test for the Basics of Python course at Mukesh Patel School of Technology Management & Engineering for the academic year 2024-2025. The test consists of three questions, with the first being compulsory, covering topics such as jump length in arrays, finding two indices that sum to a target, and string manipulation. Each question includes examples and specifies the marks allocated.

Uploaded by

Topchefoframen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SV '~ 'S NMIMs

MUKES~ PATEL scH


OOL OF TECHN
0L
ENGINEERING OGYMANA~
Acadenf y t¼tNr &
Program: BTI le ear: 2024-2025
Stream: Computer En Year: II Semester: IV
gineering
Subject: Basics of pytho
n
Date: 06/02/2025 ime: 45 Minutes (08:0s
::ih . - - -
- --

Marks: 10 No. of Pages: 1 -l• to 08:50 am)


SET:B
Class Test-I

Instructions:.Candida
1) Fi tes should read the in
gures in brackets on structions carefully.
2) Assume Suitable da the right-hand side indicate full marks.
ta
3) First Question is co if necessary.
mpulsory.
4) Attempt any one fro
m Question 2 and 3

Answer briefly:
Given a list of non-ne
the list. ga tiv e integers, you· are initia
lly positioned at the fir
Ea ch el em en t in the
st index of
Ql array represents your ma
Determine if you are ab ximum jump length at tha
C0-1 le to reach the last ind t position.
Determine if you are ex.
SO- Example: ab le to rea ch the last index.
BL-6 Input: {2,3,l,1,41 [S)
Output: true •
Explanation: Jump l
step from index Oto 1,
then 3 steps to the last
index.
Given a list of integers
, ret
specific target. You ma urn indices of the two numbers such that they
y assume that each inp ad
Q2 you may not use the sam ut would have exactly on d up to a
e element twice. e solution, and
C0-1 Example:
SO- Input:
BL-6 nums = [2, 7, 11, 15),
target= 9,
Output: nums[0J + nu
ms[l] = 2 + 7 = 9, retur
n [O, I].
Q3
Write a python progra
C0-1 m to take string input
frequency of each char from the user and print
so- acter in the string. the count of
BL-6°

Assistant Pro_r,,essor Kns• h Samda11i


na
MUKES H PATEL SCHOOL OF TECHNOLOGY MANAG EMENT &

El' GINEERING
I

'Pi~
1 ~~n ---_ _:_A:c:ad:e::_rr1 -:--·c_Y_e_ar-r-:_20_2_ 4-=-2_0 2_5~--: ---;-:-;- ----~
Program: BTI Year: II Semester: IV
Stream: Computer Engineering
Subject: Basics of Python
ime: 45 Minutes (08:05 am to 08:50 am)
Date: 06/02/2025 No ..of Pages: I
Marks: 10 SET:A
Class Test-I

Instructions: Candidates should read the instructions carefully.


1) Figures in brackets on the right-hand side indicate full marks.
2) Assume Suitable data if n~cessary.
3) F•rst Question is compulsory.
4) Attempt any one from Question 2 and 3

Answer briefly:
Write a program to take input from the user and store the values in a list datatype.
Ql The list may consist of unsorted items. Find the smallest missing positive integer from
C0-1 the list.
SO- Example: [5]
BL-6 Input:,,[1, 2, 0]
Output: 3
Given a non-empty array of digits representing a non-negative.integer, plus one
to the integer. • •
Q2 The digits are stored such that the most significant digit is at the head of the
list, and each element in the array contains a single digit. L
C0-1 You may assume the integer does not contain any leading zero, except the number [S]
SO- 0 itself.
BL-6 Example:
Input: [1,2,3]
Output: [1,2,41 The array represents the inte1;er 123.
Q3
Write a program to accept a string from the user. Remove the vowels from it and
C0-1 [5]
display' the new string.
SO-
BL-6
I

You might also like