<jupyter_start><jupyter_text>T&T Lab - 20th <NAME> (1828249)  _Find the square and cube of a number_<jupyter_code>#Method1
n=int(input("Enter a Number:"))
e=int(input("Enter it's Exponent:"))
print("{} raised to the power {} is {}".format(n,e,n**e))
#Method2
n=int(input("Enter a Number:"))
e=input("Type 'Square' for square and 'Cube' for cube: ")

if e=='Square':
    r=n**2
elif e=='Cube':
    r=n**3
else:
    print("Invalid Input")
    
print("{} of {} is {}".format(e,n,r))<jupyter_output>Enter a Number:8
Type 'Square' for square and 'Cube' for cube: Cube
Cube of 8 is 512<jupyter_text>_WAP TO MATCH WHETHER YOUR GUESED VALUES ARE SAME AS THAT OF SCORED VALUES AND ALSO FIND THE GRADES OF SCORED VALUES_<jupyter_code>import pandas as pd
import numpy as np
import random

#Report Card
subjects=['BD','CC','ESDA','CG','DMDW']
scoredValues=pd.DataFrame(data=[random.randint(10,101) for x in range(1,6)],index=subjects,columns=['Percentage'])
scoredValues
#Guess Work
print("Guess the Percentage scored in : ")
for i in subjects:
    print(i,end=' :')
    if int(input(""))==scoredValues.loc[i,'Percentage']:
        print("\tYou Guessed Correctly!,You scored {} in {}".format(scoredValues.loc[i,'Percentage'],i))
    else:
        print("\tYour Guess is Wrong!,You scored {} in {}".format(scoredValues.loc[i,'Percentage'],i))
#Grading
def grade(percent):
    if 100>=percent>90:
        return "O"
    elif 90>=percent>80:
        return "E"
    elif 80>=percent>70:
        return "A"
    elif 70>=percent>60:
        return "B"
    elif 60>=percent>50:
        return "C"
    elif 50>=percent>40:
        return "D"
    else:
        return "Fail"

scoredValues['Grade']=scoredValues['Percentage'].agg(grade)
scoredValues<jupyter_output><empty_output><jupyter_text>_WAP TO PREPARE A SHOPPING LIST, ATLEAST 10 INPUTS AND TO DISPLAY THE ITEM WHICH HAS MAX PRIORITY_<jupyter_code>items=int(input('No. of Items:'))
itemList=[(input("Item: "),random.randint(1,15)) for x in range(1,items+1)]
shoppingList=pd.DataFrame(data=itemList,index=[x for x in range(1,len(itemList)+1)],columns=['Item','Quantity'])
#Shopping List
shoppingList
#Higher the quantity Higher the Priority
priority=shoppingList.index.values[1]
for i in shoppingList.index.values:
    if shoppingList.loc[priority,'Quantity']<shoppingList.loc[i,'Quantity']:
        priority=i

print("{} has the highest Priority".format(shoppingList.loc[priority,'Item']))<jupyter_output>Butter has the highest Priority<jupyter_text>_WAP TO  CALCULATE THE COST OF FILLING A CYLINDER (USER WILL GIVE THE DIMENSION)  @ 235/Cu.m and also the time to fill if it takes 14minutes to fill 1 cu. m_<jupyter_code>import math
r=float(input("Enter Radius of the Cylinder: "))
h=float(input("Enter Height of the Cylinder: "))
volume=math.pi*(r**2)*h
volume
print("The cost of Filling the cylinder is {r:1.2f} Rs. ".format(r=volume*235))
print("It takes {} minutes & {} seconds to fill the cylinder".format(int(volume/14),int((volume%14)*100/60)))<jupyter_output>Enter Radius of the Cylinder: 6
Enter Height of the Cylinder: 10
The cost of Filling the cylinder is 265778.74 Rs. 
It takes 80 minutes & 18 seconds to fill the cylinder<jupyter_text>_Wap to store a student list with all the details of a student and give warning to students with attendance less than 60_<jupyter_code>students = [ ('Jack', 89,'CSE', 'Sydeny' , 'Australia') ,
             ('Riti', 60,'IT', 'Delhi' , 'India' ) ,
             ('Vikas', 92,'CSSE', 'Mumbai' , 'India' ) ,
             ('Neelu', 46,'CSCE', 'Bangalore' , 'India' ) ,
             ('John', 76,'IT', 'New York' , 'US') ,
             ('Mike', 87,'EEE','las vegas' , 'US'),
             ('Manish',49,'CSSE','Indore','India')]

studentDetails=pd.DataFrame(data=students,index=[1808200+ random.randint(0,90000) for x in range(1,len(students)+1)],
                            columns=['Name','Attendance %','Branch','City','Country'])
studentDetails
for i in studentDetails.index.values:
    if studentDetails.loc[i,'Attendance %'] < 60:
        print("Warning! {}, your Attendance is below 60%".format(studentDetails.loc[i,'Name']))<jupyter_output>Warning! Neelu, your Attendance is below 60%
Warning! Manish, your Attendance is below 60%
StarcoderdataJupyterStructuredCleanDedup