Giter Site home page Giter Site logo

pyexercise's Introduction

Let's do some exercise in Python!

Question 1

count_list = [10, 20, 30, 40, 50, 60, 70, 80, 90] Write a function in Python language to calculate the average of the numbers in the list above.

Question 2

Write a function to remove duplicate integers from a given integer array of given length. Return a new array with result, do not modify the existing array. Also return the length of the result array.

count_list = [10, 20, 10, 30, 30, 40, 20, 50, 90, 60, 80, 70, 80, 90]

Question 3

Write a class/function to return True if 2 input strings are anagram to each other. string1 is an anagram of string2 if string2 can be obtained by rearranging the characters in string1. Example: string1 = ‘smart’, string2 = ‘marts’ => result = True string1 = ‘secure’, string2 = ‘rescue’ => result = True

Question 4

Write a program in Python, which: a. Finds and fetches all images on a webpage and stores the images on disk b. Writes a file on disk, which lists the URLs of the images fetched

How you can contribute?

Fork this repository. If you have any better solution, do 'pull request'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.