-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass1.py
45 lines (30 loc) · 798 Bytes
/
class1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#This a our first time doing scripts
#our first function
def goodday():
print('Good Day')
print('How are you?')
#our second function
def goodevening(name):
print('Good evening',name)
print ('Hey '+ name+' How about coffee!!!')
#our third function
'''
def main():
print("This program illustrates a chaotic function")
x=eval(input("Enter a number between 0 and 1: "))
for i in range (10):
x+ 3.9 * x * (1-x)
print (x)
main()
'''
#our fourth function
def main():
print("This program illustrates a chaotic function")
x=eval(input("Enter a number between 0 and 1: "))
if x>0 and x<1:
for i in range(10):
x= 3.9*x*(x-1)
print(x)
else:
print("your number x is out of range")
main()