Average 2 pcs
Write a program that receives two users and prints the mean on output
Write a program that receives two users and prints the mean on output
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
def calculate_average(): # Receive two numbers from the user num1 = float(input("لطفاً عدد اول را وارد کنید: ")) num2 = float(input("لطفاً عدد دوم را وارد کنید: ")) # Calculate the mean average = (num1 + num2) / 2 # Average printing print(f"میانگین دو عدد {num1} و {num2} برابر است با: {average}") # Implementation of the function calculate_average()
class Math: def __init__(self,num1,num2): self.num1=num1 self.num2=num2 def Way(self): return (self.num1+self.num2)/2 num1=int(input("enrer your number1:")) num2=int(input("enter your number2:")) obj=Math(num1,num2) print(obj.Way())
def cp(a,c): global s s = (a + c)/2 print(s) a = int(input("number1:")) c = int(input("number2:")) cp(a,c)
def average(num1,num2): ave = (num1 + num2)/2 return ave a = float(input("number 1: ")) b = float(input("number 2: ")) print("average is: ",average(a,b))
a=int(input( 'num:')) b=int(input( 'num:')) print(a+b)
def miyangin(n,m): c = (m + n) / 2 return c print(miyangin(m=int(input("enter your m:")),n=int(input("enter your n:"))))
a = float(input("number 1 :")) b = float(input("number 2 :")) sum= a + b AVG= sum / 2 print("miangin:" , AVG)
Submitting answers is currently unavailable.
Write a program that prints an integers in the output. Get the desired interval from the input.
Write a program that the user can add and delete the student name. After each deletion or adding the student, the list of existing students should be displayed as below Choose: 1.Add 2.Rmove1name: hooshang1 ....
Write a function that receives a username and if it was a character except the lowercase English letters, FALSE and otherwise TRUE
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.