-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic_Problems.py
More file actions
53 lines (41 loc) · 1.47 KB
/
basic_Problems.py
File metadata and controls
53 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -- Given an integer, , perform the following conditional actions:
# -- If n is odd, print Weird
# -- If n is even and in the inclusive range of 2 to 5, print Not Weird
# -- If n is even and in the inclusive range of 6 to 20 , print Weird
# -- If n is even and greater than 20 , print Not Weird -->
# -- <!--
# -- Output Format
# -- Print Weird if the number is weird. Otherwise, print Not Weird.
there is some test change
# n=int(input("enter:"))
# if(n%2==0) or (n>=6 and n<=20):
# print("Not weird")
# if(n>=2 and n<=5):
# print(" Weird")
# Task
# The provided code stub reads two integers from STDIN, and . Add code to print three lines where:
# The first line contains the sum of the two numbers.
# The second line contains the difference of the two numbers (first - second).
# The third line contains the product of the two numbers.
# a=int(input("enter a num_1="))
# b=int(input("enter a num_2="))
# c=a+b
# d=a-b
# e=a*b
# print(c)
# print(d)
# print(e)
# Task
# The provided code stub reads two integers, and , from STDIN.
# Add logic to print two lines. The first line should contain the result of integer division, // . The second line should contain the result of float division, / .
# No rounding or formatting is necessary
# a = int(input())
# b = int(input())
# c=a//b
# d=a/b
# print(c)
# print(d)
# The provided code stub reads and integer,n , from STDIN. For all non-negative integers i<n , print i*i.
# n=int(input())
# for i in range(0,n):
# print(i*i)