Professional Documents
Culture Documents
MK Bhardwaj Prutor Quiz 3
MK Bhardwaj Prutor Quiz 3
Problem :591
Problem Statement
consonant
\\; um=0
~rint ( "The first n positive
How to attempt this coding_guestion?
~or i in range(1 , 100) :
1. Write your answer code within the editor area on the right
sum=sum+ i
2 Do Not write the main method and Do Not change the function name if sum>100 :
3. To compile/execute the program , Click C&E break
4 . If you want to run your code with any input values , Use menu Run => print (i , end =' ')
Evaluate (click evaluate button) print ( "Sum of the numbers " , sum- i)
5. Result will be display in Output tab
Problem :603
Problem State1T1ent
C ii python.prutor.ai/editor/1147897
Expected output ·
G iven string is= level
It is palindrome
1 b yli st = []
How to attemP-t this coding_i:iuestion? 2T for i in range(1,11):
1 Write your answe r code within the editor area on the right 3 myli st .append(5 *i )
2 . Do Not wnte the mam method and Do Not change the function name 4 print ( "First 10 multiple of 5 =" )
3 . To compile/execute the program Cilek C&E
5 print( myli st )
4 If you w ant to run your code with any input values , Use menu Run =>
Evaluate (click evaluate button)
5 Result will be display in Output tab
Probl em :24 79
Problem Statement
Required output"
First 1 0 multiple of 5 =
[5 , 10 15 20 , 25 30 35 40 45 50)
mco11so1e [5I AcllVlty LOC! [j lrput .-.outp·t ► . 11 I •
~ ITS ESC101 File Run Help lii1 CodeBook -✓• Practice 0 Scratchpad
1 num= [1 5 ,14, 50 , 21 , 34 , 28 , 98 ]
2 print ( "Given list is =" ,num)
How to attempt this coding__g uestion ? 3 j = [num for num in n um if num % 2 != 0]
1 Wri te your answer code w1th111 the editor area on the right 4
2 •o Not \\ te the main method and C'o Not change the function name 5 pr·int("After r·emoving even numbers from list = ")
3 To comp1l e,e,ecute the program , Cilek C&E 6 print(j)
I: -t If vou want to run vour code with any mput values, Use menu Run => 1
m
Evaluate tcl1ck evaluate button)
5 Result \\ 111 be d1splav 111 Output tab
.J Problem :3083
Problem Statement
Wnte a Pvthon program to removmg e\·en numbers from given 11st usmg list
comprehension \list 1s g1\ en belov.)
E:--.pected output
Given list 1s = [ "5. 1-t 50 2 1 34 28 98]
After · emqvmg e\ en nur,bers fro111 ' st = • console [') Ip \. ' I L
[15 21]