برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام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
name=['ولوو','تسلا','بنز','سایپا'] for s in enumerate(name): print(s)
<!DOCTYPE html> <html lang="fa"> <head> <title>script</title> <style> ol{ width: 100px; border: 2px solid #000000; text-align: center; background-color: azure; padding-top: 5px; padding-bottom: 5px; padding-right: 5px; border-radius: 10px; margin-left: auto; margin-right: auto; margin-top: 20px; } li{ border: 1px solid #000000 ; background-color: antiquewhite; border-radius: 5px; } </style> </head> <body> <ol> <li>سایپا</li> <li>بنز</li> <li>تسلا</li> <li>ولوو</li> </ol> </body> </html>
def li(name): for i in range(len(cars)): print(f'{i+1}- {cars[i]}') cars = ["سایپا","بنز","تسلا","ولوو"] li(cars)
car_brands = ["سایپا", "بنز", "تسلا", "ولوو"] # View List with Items Number print("لیست برندهای خودرو:") for index, brand in enumerate(car_brands, start=1): print(f"{index}. {brand}")
<!DOCTYPE html>
<html dir="rtl">
<body>
<ol>
<li>
سایپا
</li>
<li>
بنز
</li>
<li>
تسلا
</li>
<li>
ولوو
</li>
</ol>
</body>
</html>
cars = ['سایپا', 'بنز', 'تسلا', 'ولوو'] for item in cars: print(f"{cars.index(item) + 1}- {item} ")
cars = ["saipa", "benz", "tesla", "valoo"] for index, car in enumerate(cars, 1): print(f"{index}.{car}")
Submitting answers is currently unavailable.
Write a program that receives the user's age from the input and checks that if the user was younger than 1, it would be a throw/raise error, otherwise print a welcome message
Write a program that translates the following words from Farsi to English and vice versa. The program must be implemented infinitely and it is possible to add new words easily words: Hello = hello goodbye = bye Kata ...
Write a program that receives the radius of the circle and prints its area and environmental area = radius * Pi (3.14) circle environment = diameter (radius * 2) * Pi (3.14)
Write a program that receives a number and prints the first counters in the output
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام 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.