List of commits:
Subject Hash Author Date (UTC)
add binomischeformel 3.art dc2a4610fff2fdaf9cdbe986064a9780f8209ff5 fugohan 2020-03-03 13:20:35
requirements 9543a5d4fe3a1fff69c5376bb5b76de65bbfe97d fugohan 2020-03-01 17:57:21
update end c25d7a40770df4e6adc9271189db9bc26dddc2d0 fugohan 2020-03-01 17:53:01
update2 8374751a1fdf1759df5a4c61806d0501c50866e3 rocketgit-morehan 2020-03-01 17:49:47
update b3dada4eb2fd1dfa992f14cadf60f1b5cca3a03a rocketgit-morehan 2020-03-01 17:48:09
init b57bb8bb6a00bee9b9dc8e52e5c738b4c64ae063 fugohan 2020-03-01 17:37:55
Commit dc2a4610fff2fdaf9cdbe986064a9780f8209ff5 - add binomischeformel 3.art
Author: fugohan
Author date (UTC): 2020-03-03 13:20
Committer name: fugohan
Committer date (UTC): 2020-03-03 13:20
Parent(s): 9543a5d4fe3a1fff69c5376bb5b76de65bbfe97d
Signing key:
Tree: 6fcc8d0a88f6811131cf01f3984d3174b40256c0
File Lines added Lines deleted
binomischeformeln.py 39 5
File binomischeformeln.py changed (mode: 100644) (index a147186..967d165)
... ... import numpy as np
2 2 import sympy as s import sympy as s
3 3 from sympy import pprint, Symbol, sin, exp, sqrt, series, latex, symbols, simplify, expand from sympy import pprint, Symbol, sin, exp, sqrt, series, latex, symbols, simplify, expand
4 4 from sympy import init_printing from sympy import init_printing
5 import io
5 6
6 7 cols = 2 cols = 2
7 8 rows = 5 rows = 5
 
... ... def a2le(list):
46 47 temp.append(le(list[i])) temp.append(le(list[i]))
47 48 return temp return temp
48 49
49 def binomischeform1(test1):
50 def binomischeform1():
51 test1 = (np.random.randint(-11, 11, cols * rows)*a+np.random.randint(-11, 11, cols*rows)*b)**2
50 52 out_ang = "\\begin{equation*} \n" out_ang = "\\begin{equation*} \n"
51 53 for i in range(len(a2l(test1))): for i in range(len(a2l(test1))):
52 54 if i%rows is 0: if i%rows is 0:
 
... ... def binomischeform1(test1):
68 70 # out_ang = " \\\\ ".join(a2l(test1))+"" # out_ang = " \\\\ ".join(a2l(test1))+""
69 71 out_los += "\\end{equation*}" out_los += "\\end{equation*}"
70 72 return out_ang, out_los return out_ang, out_los
73
74
75 def binomischeform3():
76 a,b,c = symbols('a b c')
77 zahlen1 = np.random.randint(-11,11,cols*rows)
78 zahlen2 = np.random.randint(-11, 11, cols * rows)
79 out_ang = "\\begin{equation*}"
80 for i in range(len(zahlen1)):
81 if i%rows is 0:
82 out_ang += "\\begin{aligned}[c]\n"+l((zahlen1[i]*a+zahlen2[i]*b)*(zahlen1[i]*a-zahlen2[i]*b))+"\\\\"
83 if i%rows is not 0 and i%rows is not rows-1:
84 out_ang += l((zahlen1[i]*a+zahlen2[i]*b)*(zahlen1[i]*a-zahlen2[i]*b))+"\\\\"
85 if i%rows is rows-1:
86 out_ang += l((zahlen1[i]*a+zahlen2[i]*b)*(zahlen1[i]*a-zahlen2[i]*b)) + "\n\\end{aligned} \n\\qquad \n"
87 out_ang+="\end{equation*}"
88 out_los = "\\section{Lösung:}\n\\begin{equation*} \n \hspace{-" + str(cols * 20) + "px}"
89 for i in range(len(zahlen1)):
90 if i%rows is 0:
91 out_los += "\\begin{aligned}[c]\n"+le((zahlen1[i]*a+zahlen2[i]*b)*(zahlen1[i]*a-zahlen2[i]*b))+"\\\\"
92 if i%rows is not 0 and i%rows is not rows-1:
93 out_los += le((zahlen1[i]*a+zahlen2[i]*b)*(zahlen1[i]*a-zahlen2[i]*b))+"\\\\"
94 if i%rows is rows-1:
95 out_los += le((zahlen1[i]*a+zahlen2[i]*b)*(zahlen1[i]*a-zahlen2[i]*b)) + "\n\\end{aligned} \n\\qquad \n"
96 out_los += "\end{equation*}"
97 return out_ang, out_los
98
99
100
101
71 102 x, y, z, a, b, c = symbols('x y z a b c') x, y, z, a, b, c = symbols('x y z a b c')
72 103
73 test1 = (np.random.randint(1, 11, cols * rows)*a+np.random.randint(1, 11, cols*rows)*b)**2
74 104
105 binomischeform3()
106 #exit()
107 #test2 = (np.random.randint(1,11,cols*rows)*a-)
75 108
76 109 #print(out_ang) #print(out_ang)
77 110
78 111 #print("{0}\n{1}".format(binomischeform1(test1))) #print("{0}\n{1}".format(binomischeform1(test1)))
79 112 #print(len(binomischeform1(test1))) #print(len(binomischeform1(test1)))
80 113
81 b = binomischeform1(test1)
114 b = binomischeform1()
115 #b= binomischeform3()
82 116
83 117 # print(b[0]) # print(b[0])
84 118 # print(b[1]) # print(b[1])
85
86 f = open("latexout2.tex", "w")
119 f = io.open("latexout2.tex","w",encoding="utf-8")
120 #f = open("latexout2.tex", "w", "utf-8")
87 121 f.write("{}\n{}".format(b[0],b[1])) f.write("{}\n{}".format(b[0],b[1]))
88 122
89 123 #print("{}\n{}".format(b[0],b[1])) #print("{}\n{}".format(b[0],b[1]))
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/rocketgit-morehan/bspgen2

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/rocketgit-morehan/bspgen2

Clone this repository using git:
git clone git://git.rocketgit.com/user/rocketgit-morehan/bspgen2

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main