Skip to content

WildPieChan/Lesson_1_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lesson 1

Introduction to Python (seminars)

Homework:


1. Write a program that accepts a digit indicating the day of the week as input and checks whether this day is a weekend.
Example:
6 → yes
7 → yes
1 → no

2. Write a program for verification of the truth of the statemen ¬(X ⋁ Y ⋁ Z) = ¬X ⋀ ¬Y ⋀ ¬Z for all values of the predicate.

3. Write a program that takes the coordinates of a point (X and Y) as input, with X ≠ 0 and Y ≠ 0 and outputs the number of the quarter of the plane in which this point is located (or on which axis it is located).
Example:
x=34; y=-30 → 4
x=2; y=4 → 1
x=-34; y=-30 → 3

4. Write a program that shows the range of possible coordinates of points in this quarter (x and y) according to the given number of quarters.

5. Write a program that takes the coordinates of two points as input and finds the distance between them in 2D space.
Example:
A (3,6); B (2,1) → 5,09
A (7,-5); B (1,-1) → 7,21

About

Introduction to Python (seminars)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages