diff --git a/README.md b/README.md index 2649c54..aa8b2ea 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/XeMTL_Yx) # 🐍 Python Assignment: Loops, Ranges, and String Manipulation #### ✨ Instructions: diff --git a/assignment4.py b/assignment4.py new file mode 100644 index 0000000..6e07425 --- /dev/null +++ b/assignment4.py @@ -0,0 +1,26 @@ +for i in range(1,21): + print(i) +for i in range(1,21): + if i % 2 == 0 : + print(i) +for i in range(1,11): + if i != 5: + print(i) + continue + + +for i in range(1,11): + if i == 7: + break + print(i) + + +secret_number = 7 +while True: + number=int(input("guess the number 1-10 : ")) + if number == secret_number: + print(f"you got it , well done it's number {number}") + break + else: + continue +