-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputcode.py
More file actions
93 lines (77 loc) · 3.01 KB
/
Inputcode.py
File metadata and controls
93 lines (77 loc) · 3.01 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: User
#
# Created: 23/03/2019
# Copyright: (c) User 2019
# Licence: <your licence>
#-------------------------------------------------------------------------------
print ("""entered value inside input function will
always get out as string""")
print ("""entered value inside input function will
always get out as string""")
name=input('Please enter your anme: ')
age=input(' Please enter your age: ')
print(" Hello" , name , "you are " , age)
n = input("please input your age")
print(float(n)/2)
print ("""entered value inside input function will
always get out as string""")
print ("""entered value inside input function will
always get out as string""")
primelist2=[]
lower=int(input("please enter the 'lower' or first value: " ))
upper=int(input("please enter the 'upper' or last value: " ))
for num in range (lower, upper+1):
if num>1:
for i in range (2, num):
if num%i==0:
break
else:
primelist2.append(num)
print("""After entering the values those codes will show prime number
list between """ ,
lower, "and", upper, ''' numbers''' )
print(primelist2)
print(''' But we can reduce the output time by setting range of the diviser to
square root of a number''')
primelist3=[]
lower2=int(input("please enter the 'lower2' or first value: " ))
upper2=int(input("please enter the 'upper2' or last value: " ))
for num in range (lower2, upper2+1):
if num>1:
for i in range (2, int(num**.5)+1):
if num%i==0:
break
else:
primelist3.append(num)
print("""After entering the values those codes will show prime number
list between """ ,
lower2, "and", upper2, ''' numbers''' )
print(primelist3)
print('#----------------------------------------')
print("foo")
foo=input("Pleae enter the value of foo: ")
print(foo)
print(float("210" * int(input("Enter a intiger number : "))))
float(input("Enter a number: ")) + float(input("Enter a number: "))
float(input("Enter a number fia: ")) + float(input("Enter a number fib: "))
print(float(input("Enter a number pfic1 : ")) + float(input("Enter a number pfic2 : ")))
print(int(input("Enter a number piic1 : ")) + int(input("Enter a number piic2 : ")))
input('To continue to the end of programm \n- Please Enter something :____ ')
print (input('To continue to the end of programm \n- Please Enter something :____ '))
codex=input(''' please input your code by typing
copy paste will not work till now :
''' )
print(codex)
print("The above code that you typed - will give output")
exec(codex)
name=input('Please enter your anme: ')
age=input(' Please enter your age: ')
print(" Hello" , name , "you are " , age)
num1=input('Please enter a number: ')
num2=input('Please enter another number: ')
result=float(num1)+float(num2)
print(result)