הי ותודה על התשובה המהירה.
מצרף את הפתרונות שלי … לעיונך והערותיך…
1.
"""
This exercise ask the person to Enter his age in years and print his age in months
"""
print("This Program will Calculate Your Age in Months.")
x=int(input("Please Enter Your Age in Years:"))
y=x*12
print("your Age is:", y,"Months")
-
"""
This exercise ask the person to Enter his age in Months and print his age in Years
"""
print("This Program will Calculate Your Age in Years.")
x=int(input("Please Enter Your Age in Months:"))
y=x/12
print("your Age is:", y,"Years Old")
-
"""
This Program Ask To Enter a Number, and if The Number Divided by 7, "BOOM" will be printed
"""
x=int(input("Please Enter a Number to Check if dividing Exacly by 7 : "))
y=int(x/7)
if y*7==x:
print("BOOM !!!", "THE NUMBER", (x),"DIVIDING EXACLY BY 7")
-
"""
This Program Ask To Enter a Number, and if The Number Divided by 7, or Contains The Number "7", "BOOM" will be printed
"""
x: int=int(input("Please Enter a Number to Check if dividing Exacly by 7 : "))
y=int(x/7)
if y*7==x:
print("BOOM !!!", "THE NUMBER", (x),"DIVIDING EXACLY BY 7")
if str(x).__contains__("7"):
print("BOOM !!! THE NUMBER CONSIST THE DIGIT 7")
-
"""
This Program Check The Biggest Between 3 Numbers
"""
x = int(input( "Please Insert First Number"))
y = int(input("Please Insert Second Number"))
z = int(input("Please Insert Third Number"))
if x>y and x>z:
print(f"The Biggest Number Between {x}, {y}, {z} IS:", x)
if y>x and y>z:
print(f"The Biggest Number Between {x}, {y}, {z} IS:", y)
if z>x and z>y:
print(f"The Biggest Number Between {x}, {y}, {z} IS:", z)
-
"""
The Program Calculate The SUM of Arithmetic sequence.
You Need To Provide a Few Parameters of the Arithmetic sequence:
1. First value of the Sequence [A1]
2. Constant Differential {D]
3. The Number Of Syntax at The Sequence [N]
"""
a1 = int(input("ENTER THE VALUE OF THE FIRST SEGMENT AT THE ARITHMETIC SEQUENCE"))
d = int(input("ENTER THE VALUE OF THE DIFFERENTIAL OF THE ARITHMETIC SEQUENCE"))
n = int(input("ENTER THE NUMBER OF THE SEGMENTS AT THE ARITHMETIC SEQUENCE"))
s = ((((n-1)*d)+2*a1)*n)/2
print(f"THE SUM OF THE ARITHMETIC SEQUENS IS: ", {s})
תודה