Skip to content

d-zienke/python-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Python - collection of tasks

task 1:

Get three non-negative integers from the keyboard. 
If any of them are negative, get another one. 
Then find the largest of them. 
Display the sum of the other numbers as many times as the value of the largest number.

task 2:

Verify the integer taken from the keyboard for parity. 
Display an adequate message when it is or is not even.

task 3:

Get an integer from the keyboard and check if it is divisible: 
by 3 and by 5; 
by 3, but not by 5; 
by 5, but not by 3; 
neither by 3 nor by 5. 
Display the correct answer on the screen.

task 4:

You have this expression: (((a1+a2)*a3)-a4)/a5 (elements a1 through a5 are of float type).
Get each of the variables a1 through a5 from the keyboard, calculate the value of the expression and display the result. 
Pay attention to the value of the variable a5. In case its value is equal to 0, do not perform the action, but inform about it.

task 5:

Get five integers from the keyboard and display how many of them were even and how many were odd.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages