Create a dataframe by using the dataset [tipsnew.csv] and perform the
following operations
a) Print the day value when the value of total_bill is maximum and
minimum.
b) Retrieve all the rows from dataframe when the value of tip is more
than 3.0 and less than 5.0
c) Print the time of the meal and gender of the person who paid the tip
more than 5.0
d) Select and display last 10 rows from the dataframe when customer
smoking habbit is ‘yes’
e) Create the newdataframe(ndf) from original dataframe(df)
containing all rows and the following columns [total_bill
tip, size].
Sort and display all values of column tip in ascendending order
Discuss different ways of creating a dataframe in python programming
languages using panda library. Justify your answer with the help of
suitable example
With the help panda library create a dataframe using the concept of
dictionary of lists where Keys and Values of dictionary take the data as
mention above in the figure and perform the following operations
a) Print All columns name from the dataframe and change the
b) Display top 7 and bottom 7 rows of first 3 and last 3 columns
c) Write the python code statement to print the value “21-Jan-12” from
dataframe.
d) Write the python code statement to print the values 2nd,4th ,6th , 8th and
10th row for the column “No of Hours”
e) Display the total sum of column total_payout
Write a program that declare an array of size 25 consisting of students’ test scores in the range 0–200. The user may input any score in the array. It should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. Output the score ranges and the number of students. (Run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157)
Given an array arr[] sorted in ascending order of size N and an integer K. Check if K is present in the array or not. (Use Binary Search)
Input: N = 5
K = 6
arr[] = {1,2,3,4,6}
Output: 1
Explanation: Since, 6 is present in the array at index 4 (0-based indexing),
output is 1
Create a C program that will be able to compute the prelim grade up to finals grade of a certain student.
Note: (Only the prelim grade, midterm grade and final grade will be entered.)
Specification:
Total Grade= (Prelim Grade *.30)+(Midterm Grade*.30) + (Final Grade*.40)
Equivalent:
98-100 1.00 83-85 2.25
95-97 1.25 80-82 2.50
92-94 1.50 77-79 2.75
89-91 1.75 75-76 3.00
86-88 2.00
74 and below 5.00
Remarks: (note: separate the condition of remarks to equivalent)
Pass>=75 Failed<=74
toss a coin in c++ (simple toss) without using functions
Write a complete C++ program that checks if a given triangle is right-angled or not. The program shall ask
the user to enter three sides, and calculate c2 = a2 + b2, to check if the triangle is right-angled or not. Please
note that any side can be hypotenuse, i.e., you need to check by comparing square of each side with the sum
of square of other two side.
After indicating the message, the program shall ask the user if they want to know about another triangle.
The user may choose ‘Y’ (for yes), or ‘N’ (for No). In case of No, the program terminates. In case of yes, the
program asks for further input and checks the newly entered triangle. See the following example.
Enter three sides: 14 5 8
The entered triangle is not right-angled. Do you want to check another triangle (Y/N): N
Write a C++ program that keeps taking positive integers from the user until user enters -1. The program counts and displays how may even and odd numbers are entered by the user. See the following example. Enter a number (enter -1 to exit): 5 Enter a number (enter -1 to exit): 34 Enter a number (enter -1 to exit): 4 Enter a number (enter -1 to exit): -1 You have entered 2 even and 1 odd numbers.
Python code to input 10 values and get the average temperature of a patient. if the average temperature value is in between 97 Fahrenheit and 99 Fahrenheit then display the message “Your body temperature is normal...”. If it is more than 100.40 Fahrenheit then display the message “You have a fever caused by an infection or illness...”.