-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheasytask.py
More file actions
35 lines (26 loc) · 750 Bytes
/
Copy patheasytask.py
File metadata and controls
35 lines (26 loc) · 750 Bytes
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
#!/usr/bin/env python3
# Definiere die Variablen
boolean_variable = True
string_variable = "hello world!"
integer_variable = 42
# Gprint variables
print("Boolean Variable:", boolean_variable)
print("String Variable:", string_variable)
print("Integer Variable:", integer_variable)
# Functioin to check if it is a + or - number
def check_sign(num):
if num > 0:
print("this number is positiv.")
elif num < 0:
print("this number is negativ.")
else:
print("this number is zero.")
# examplenumber
number = -10
# Start of the function
check_sign(number)
# string
string1 = "coffee please"
# For-loop to run trough every numer in the string
for char in string1:
print(char)