x=0
y=0
while 1==1:
while y!=5:
y=y+1
print(str(x) + str(y))
else:
x=x+1
#NOW GO TO WHILE 1==1 AND DO THAT AGAIN
此代码应该打印01; 02; 03; 04; 05然后它应该打印11; 12; 13; 1
我在Python 3.6.0上编写了下面的代码来找到Spyder编辑器上的立方体根。 #Finding the cube root
#import math
y=input("Enter a number whose cube root you want to find: ")
root=float(y)
#x1=math.pow(root,1/3)
我试图在getCommand函数中使用while(1)循环,但它运行无限且不会中断。我已经包含了HELP函数,因为它在getCommand函数中被调用。这是有问题的代码: void HELP(string inCommand) {
if (inCommand == "invLoad?")
cout << "This command allows the user to loa
我正在写一个简单的bash脚本来从文本文件中读取文件名并检查它们是否存在于目录中。虽然这工作正常,所有文件解析后,我陷入了无限循环。 #!/bin/bash
if [ "$1" = "" ]; then
echo "No input file to parse given. Give me an input file and make sure the corresponding .
我一直在努力,以创造和的OpenWRT无限循环,我已经成功了: #!/bin/sh /etc/rc.common
while [ true ]
do
# Code to run
sleep 15
done
此代码的工作作为挂饰,如果我执行它。/脚本。但是,当我打开路由器时,我希望它自己开始。我已将该脚本放入/etc/init.d并通过chmod +x script启用