Numbers to power 2
Write a program that receives a number from the input and increases the number 2 and prints in the output. This trend continues until the number 0 is not arrived
Write a program that receives a number from the input and increases the number 2 and prints in the output. This trend continues until the number 0 is not arrived
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
while 1: number=float(input("enter numbers:")) a=number**2 if number !=0: print(a) else: break print("end")
def main(): while True: # Get a number from the user number = float(input("لطفاً یک عدد وارد کنید (برای خروج 0 را وارد کنید): ")) # Check out of the loop if number == 0: print("برنامه به پایان رسید.") break # Calculating and printing power of 2 pcs squared = number ** 2 print(f"{number} به توان 2 برابر است با: {squared}") # Implementation of the program main()
while 1: number = int(input("enter num: ")) if number != 0: power = number ** 2 print(power) else: break print("end")
number = 1 while True: try: if not number == 0: number = int(input("enter your number:")) print(f"your number:{number ** 2}") else: break except: print("eror")
while 1: number = int(input("please enter a number: ")) if number == 0: break else: print("number ** 2 = ", number ** 2)
number = int(input("enter your number:")) tavvan = number ** 2 if number == 0: print("end") else: print(tavvan)
def print_nums_power_of_two(n): while n == 0: print("Because the number zero reaches the power of two, the result is zero, the program closes!!") break else: print(f"The number {n} to the power of two {n ** 2} is.") print_nums_power_of_two(int(input("Enter a number: "))) print_nums_power_of_two(int(input("Enter a number: ")))
Submitting answers is currently unavailable.
Using JavaScript, send a request with the following specifications method = posturl = /test.php FNAME information =? Lname =? Age =? Get the information above through Prompt from the user
Write a function that returns the number of a character in a string. To this question you should not use ready -to -use functions ("hooshang", "O") #2
Write a program that receives 2 users and calculates the Fibonacci series (between those two) and prints in the output
Write a program that gets the user's date of birth and determines how many years, months and a few days have passed since his birthday
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.