0% found this document useful (0 votes)
49 views11 pages

Assignment On Python 2 Basics-1. Write A Function That Returns The Maximum of Two Numbers

The document provides instructions for 10 assignments on Python basics, NumPy, Pandas and Matplotlib. The assignments include writing functions to find the maximum of two numbers, the FizzBuzz function, and a function to show numbers within a limit. Other assignments include string manipulation, counting characters, array creation and manipulation, and plotting data.

Uploaded by

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

Assignment On Python 2 Basics-1. Write A Function That Returns The Maximum of Two Numbers

The document provides instructions for 10 assignments on Python basics, NumPy, Pandas and Matplotlib. The assignments include writing functions to find the maximum of two numbers, the FizzBuzz function, and a function to show numbers within a limit. Other assignments include string manipulation, counting characters, array creation and manipulation, and plotting data.

Uploaded by

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

ASSIGNMENT ON PYTHON 2

BASICS-

1. Write a function that returns the maximum of two numbers.

2. Write a function called fizz_buzz that takes a number.


3.Write a function called show Numbers that takes a parameter called limit. 

4.Given 2 strings, s1 and s2, create a new string by appending s2 in the middle of s1
5. Arrange String characters such that lowercase letters should come first

6. Given a string input Count all lower case, upper case, digits, and special symbols
7. Find all occurrences of “USA” in given string ignoring the case

8. Given a string, return the sum and average of the digits that appear in the string, ignoring all

other characters
9. Given a string of odd length greater 7, return a string made of the middle three chars of a given

String
10. Given an input string, count occurrences of all characters within a string

NUMPY AND PANDA AND MATPLOTLIB

1. Create a 4X2 integer array and Prints its attributes


2. Create a 5X2 integer array from a range between 100 to 200 such that the difference between

each element is 10

3. Following is the provided numPy array. return array of items in the third column from all rows
4. Following is the given numpy array return array of odd rows and even columns
5. Add the following two NumPy arrays and Modify a result array by calculating the square root

of each element

6. Split the array into four equal-sized sub-arrays


7. Following is the 2-D array. Print max from axis 0 and min from axis 1

8.Following is the input NumPy array delete column two and insert following new column in its

place.
9. Create a two 2-D array and Plot it using matplotlib

10. From any given data set print first and last five rows

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy