

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Q1.Enter 3 marks for Ali ,calculate Sum, finnaly print ali marks=sum. ali=[90,85,89] print("marks") marks_ali=ali[0]+ali[1]+ali[2] print('marks after sum' , marks_ali) ....................................................................................................... Q2.Prompt the user for 2 numbers also perform various operations a. num1 // num2. b. num1 + num2. c. num1 to the power 3. num1=int(input('enter the 1st num')) num2=int(input('enter the 2nd number')) print("sum is" , num1 + num2) print("devision is " , num1 // num2) print("power 3" , num1 **3) ....................................................................................................... Q3.Define a string S="computer" write code to print c#o#m#p#u#t#e#r. s="computer" print(s[0].upper(),s[1],s[2].upper(),s[3],s[4].upper(),s[5],s[6].uppe r(),s[7],sep='#')