本文目錄一覽:
如何做一個表白的代碼
要想做一個可以表白的代碼,首先你就要學會C語言或者是C加加,如果你不會的話永遠都沒有辦法做出來的,而且現在網上有很多腳本直接可以下載的。
如何用python寫一段代碼?
簡單的,可以使用python 的CGI模塊,需要你的服務器開啟CGI支持。
網頁內容如下:
html
head
meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ /
titlepython cgi/title
/headbody
p style=”font-size:24pt;color:red”輸入登錄密碼:/p
form name=”zhaji” action=”login.py” method=”post”
p密 碼:input type=”password” name=”ma” size=”9″/p
input type=”button” name=”shuru” value=”登錄” onclick=”zhaji.submit()”
/form
/body/html
login.py文件內容如下:
#!/usr/bin/python
#coding:utf-8
import cgi
form = cgi.FieldStorage()
ma = “”
if ‘ma’ in form:
ma = form[“ma”].value
print ”’Content-Type: text/html\n\n”’
print ”’htmlheadmeta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ / titlepython cgi/title/headbodyp你輸入的密碼是:%s/p /body/html”’ % ma
怎麼用python簡單的製作一個網頁
1、打開sublime text 3,新建一個PY文件。
2、import os,因為涉及到系統文件路徑的原因,我們這裡先導入系統模塊。
3、html = open(“E:\\Download\\new\\new.html”, “w”),創建變量,然後設置文件名字,注意用w寫方式來進行,這樣就會創建一個新的HTML文件。
4、html.write(“!DOCtype HTML\
\nheadtitle新的網頁/title/head\
\nbodyh1大家好啊/h1/body”)
這個時候就可以寫入相關的HTML代碼了。
5、這個時候可以雙擊打開HTML文件,那麼就可以看到書寫的網頁了。
6、然後加上html.close(),記得加上這行代碼來關閉,不然會佔用很多內存,這樣就完成了。
求編寫一個表白程序?
JAVA
傳說中規範的愛情代碼(2010-11-10 21:37:36)
轉載
標籤:it
private final static DEPOSIT = 100000;
private final static FELLING = 8;
public void love(boy, girl) {
Boolean isMarried = false;
if(boy.有房() boy.有車()) {
doMarry(boy, girl);
isMarried = true;
} else if(girl.願意等()) {
while(!(boy.賺錢 DEPOSIT girl.感情 FELLING)) {
for(int day=1; day =365; day++) {
if( day == 情人節 ) {
if(boy.givegirl(玫瑰)) {
girl.感情++;
} else {
girl.感情–;
}
}
if(day == girl.生日) {
if( boy.givegirl(玫瑰) )
{
girl.感情++;
}
else {
girl.感情–;
boy.拚命賺錢();
}
}
}
if(boy.有房() boy.有車()) {
doMarry(boy, girl);
isMarried = true;
break;
}
年齡++;
girl.感情–;
}
}
if(!IsMarried) {
girl.goto(another_boy);
}
private void doMarry(boy, girl) {
boy.set(nothing);
girl.嫁給(boy);
}
520怎麼表白,Python程序猿都是這樣操作的
import turtle
t = turtle.Pen()
turtle.bgcolor(“black”)
my_name=turtle.textinput(“請輸入你想表白的話”,”你的表白?”)
colors=[“red”,”yellow”,”purple”,”blue”]
for x in range(100):
t.pencolor(colors[x%4])
t.penup()
t.forward(x*4)
t.pendown()
t.write(my_name,font=(“Arial”,int((x+4)/4),”bold”))
t.left(92)
print(“####結束####”)
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-hant/n/295665.html