Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Bugggggg by mohamed.py #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Buggggggs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Fibbonacci sequence calculation
a, b, n = 0, 1, 10
fibonacci = []
for i in range(n)
for i in range(n) :
fibonacci.append(a)
a, b = b, a + b
pritn(f"Fibbonacci sequence of {n} numbers: {fibonacci}")
print(f"Fibbonacci sequence of {n} numbers: {fibonacci}")

# Find minimum and maximum in a list
numbers = [3, 5, 1, 10, 2, 7, 6, 4, 8, 9]
Expand Down Expand Up @@ -58,7 +58,7 @@
vowels = "aeiou"
vowel_count = 0
for char in string:
if char in vowel:
if char in vowels:
vowel_count += 1
print(f"Number of vowels in the string: {vowel_count}")

Expand All @@ -79,7 +79,7 @@
sum_elements = 0
for num in number:
if not num > 0:
sum_elements += num
sum_elements += num
print(f"Sum of elements: {sum_elements}")

# Factorial calculation
Expand All @@ -96,9 +96,9 @@

# Checking if a number is even or odd
number = 15
if number%2 = 0:
if number%2 == 0:
print(f"{number} is even")
else
else :
print(f"{number} is odd")


Expand Down Expand Up @@ -152,7 +152,7 @@

# Check if a number is a perfect square
num = 25
if int(num 0.5) * int(num 0.5) = num:
if int (num * 0.5 ) +int (num * 0.5 ) == num :
print(f"{num} is a perfect square")
else:
print(f"{num} is not a perfect square")
Expand Down