Can anyone explain this to me?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone explain this to me??

You need to make a countdown app. Given a number N as input, output numbers from N to 1 on separate lines. Also, when the current countdown number is a multiple of 5, the app should output "Beep". Sample Input: 12 Sample Output: 12 11 10 Beep 9 8 7 6 5 Beep 4 3 2 1

13th Oct 2021, 2:18 PM
Ebrahim Lotfy
Ebrahim Lotfy - avatar
6 Answers
+ 2
if u still confused about it , I'll explain it in Arabic .
13th Oct 2021, 3:08 PM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar
+ 3
If the number can be divided by 5, output “Beep”, you'll probably need to use the modulo operator (%) to determine if a number can be divided by N.
13th Oct 2021, 2:38 PM
Tim
Tim - avatar
+ 3
Take input n and print all the numbers from n to 1.. If the number is multiple of 5 Print Beep.. using condition if(i%5==0) hope it helps.. https://code.sololearn.com/cAuDMCYdA4iB/?ref=app
13th Oct 2021, 2:47 PM
Indira
Indira - avatar
+ 2
Using a while loop that takes condition of x integer greater or equal to N,then decriment x value and use an if condition x%5 == 0 then display the string Beep ..
13th Oct 2021, 2:41 PM
HBhZ_C
HBhZ_C - avatar
+ 2
السؤال يقول : اكتب برنامج يَعُّد تنازلياً أو يكتب الأرقام تنازلياً بدءاً من الرقم الذي سيدخله المستخدم N إلى الرقم 1 وإذا كان أحد هذه الأرقام مُضاعفاً للرقم 5 يجب أن يكتب Beep. طريقة الحل سآخذ كود Indira N=int(input()) #لأخذ الرقم من المستخدم for i in range(N,0,-1): # إلى الصفر تنازلياً بمقدار واحد Nفي المجال من الرقم print(i)# iنظهر قيمة if(i%5==0):#يكون العدد مضاعفاً لعدد عندما يقبل القسمة عليه ويكون باقي القسمة صفراً فمثلاً عشرة تقسيم خمسة يساوي اثنان والباقي صفر فإذاً عشرة مضاعف لخمسة فنظهر كلمة Beep print("Beep")
27th Oct 2021, 9:16 PM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar
+ 1
If number is multiple of 5, print number beep Or else, print number alone
13th Oct 2021, 4:40 PM
Rishi
Rishi - avatar