SHARE
TWEET

Untitled

a guest Jan 17th, 2020 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func fcompare(d1,d2) {
  2.     if(d1>d2) {
  3.         return true
  4.     } else {
  5.         return false
  6.     }
  7. }
  8.  
  9. func main() {
  10.     st = ""
  11.     logfile = open ("log.txt", "w+")
  12.  
  13.     list1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
  14.     println (typeof(ARGV))
  15.     print ("Phase 1 \n", file=logfile)
  16.  
  17.     y = year()
  18.  
  19.     if (y==2020) {
  20.         println ("African agriculture is undeveloped, Jinkela is required!")
  21.         println ("It's "+list1[month()-1] + " " + str(day())+ ", "+str(y))
  22.     }
  23.     print ("Phase 2 \n", file=logfile)
  24.  
  25.     for i in range(0,10) {
  26.         println ("Hello, World!" + " " + str(i) )
  27.     }
  28.     print ("Phase 3 \n", file=logfile)
  29.  
  30.     s = ""
  31.     list2=["Reimu", "Marisa", "Yuka", "Cirno", "Meilin", "Remilia", "Flandre", "Yomu", "Yuyuko", "Suwako"]
  32.     for st in list2 {
  33.         s=s+st+" "
  34.     }
  35.     println (s)
  36.     s = ""
  37.     list3=reverse(list2)
  38.     for st in list3 {
  39.         s=s+st+" "
  40.     }
  41.     println (s)
  42.     temp = ""
  43.     for i in range(0, len(list2)-1) {
  44.         for j in range(0, len(list2)-1-i) {
  45.             if (fcompare(list2[j],list2[j+1])) {
  46.                 temp=list2[j]
  47.                 list2[j]=list2[j+1]
  48.                 list2[j+1]=temp
  49.             }
  50.         }
  51.     }
  52.     s = ""
  53.     for st in list2 {
  54.         s=s+st+" "
  55.     }
  56.     println (s)
  57.     print ("Phase 4 \n",file=logfile)
  58. }
  59.  
  60. if(__name__ == "__main__") {
  61.     main()
  62. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top