• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu

Dyskusje Q&A

Write a program to take x and y as input and output the string x, repeated y times. Sample Input hi 3 Sample Output hih
python
0 głosów
1 Odpowiedź
30th Dec 2022, 11:26 AM
X Gamerz
X Gamerz - avatar
is there any go to function in python.like if I want to run the program n times. it should ask wether I want to run the program again at the end,if the user says yes it should run again else the program should stop
python
0 głosów
3 odpowiedzi
13th Aug 2016, 3:10 PM
Purushotham Parthy
Purushotham Parthy - avatar
x = 42; int num = 0; while (num <3) Consele.writeline (x); num++; int x = 42; is just an int with an asigned value of 42 int num=0; is what initiate the count for the while loop while (num < 3); means 0<3 true, 1< 3 true, 2<3 true, the loop end at 2 bc 3 <3 is false consele.writeline (x) will display 42 while num < 3 num++ will execute and then add 1 to check if the while loop still true, but it stop at 2, bc 3 makes it false. so the consele.write will write 42 three times. x=42, remember the (x)
c#loops
0 głosów
2 odpowiedzi
5th Oct 2016, 7:33 PM
DoWhile2016
< Do tyłu12Dalej >
Popularne dzisiaj
Need a personal tutor
1 Votes
I can't figure out how to use the getElementById code in JavaScript Code Playground, I've tried multiple times and watched YT
0 Votes
Fix code
0 Votes
..
1 Votes
How can I turn my .py files to .exe files?
1 Votes
Software to write and run codes
1 Votes
Add lua
0 Votes
How Much RAM is Required for Object Detection Project
0 Votes
Beginner_to_SoloLearn
1 Votes
How to learn C++ and how long does it take
1 Votes