jagomart
digital resources
picture1_Python Pdf 185435 | Exercise Flowcontrol Lists


 141x       Filetype PDF       File size 0.22 MB       Source: eclass.upatras.gr


File: Python Pdf 185435 | Exercise Flowcontrol Lists
exercises 1 write a python program that creates a list that contains the even numbers from 1 to 50 it will print the list and its length 2 write a ...

icon picture PDF Filetype PDF | Posted on 01 Feb 2023 | 2 years ago
Partial capture of text on file.
                                                     Exercises
               1.   Write a python program that creates a list that contains the even numbers from 1 to 50. It 
                    will print the list and its length.
               2.   Write a python program that reads a string of words separated by the '?’ character and 
                    assign them as items to a list. Then print each word one by one.
               3.   Write a python program that reads the number of positive numbers, which will then read 
                    and will put to a list. Subsequently it should:
                     1.  Print its minimum, maximum, and average
                     2.  Print a (vertical) histogram from characters '*'
                     3.  Print its cumulative list. the [1,2,3] has cumulative [1,3,6].
               4.   Write a python program that creates a list of strings that the user will type in the keyboard 
                    until the word 'end'. Next, it will sort then list, print it, ask the user to give a string, which 
                    will be removed from the list (if any).
               5.   Write a python program that each element of the two-dimensional list a = [[2, 3, 5], [1, 4, 
                    7]] will replace itself with its square.
                DataD partoac persosicnegs swinitgh w Piytthh Poynthon
                                                                                                                          55
The words contained in this file might help you see if this file matches what you are looking for:

...Exercises write a python program that creates list contains the even numbers from to it will print and its length reads string of words separated by character assign them as items then each word one number positive which read put subsequently should minimum maximum average vertical histogram characters cumulative has strings user type in keyboard until end next sort ask give be removed if any element two dimensional replace itself with square datad partoac persosicnegs swinitgh w piytthh poynthon...

no reviews yet
Please Login to review.