From c7c4332097b9348ef0ddd05ab45c54cd6b3062cd Mon Sep 17 00:00:00 2001 From: SinanYsn Date: Sat, 28 Dec 2024 10:44:33 +0100 Subject: [PATCH] Sinan Ysn. 1. week solutions.py --- Sinan Ysn. 1. week solutions.py | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Sinan Ysn. 1. week solutions.py diff --git a/Sinan Ysn. 1. week solutions.py b/Sinan Ysn. 1. week solutions.py new file mode 100644 index 0000000..e720eb6 --- /dev/null +++ b/Sinan Ysn. 1. week solutions.py @@ -0,0 +1,58 @@ +#1. week 3. Question +#Write a Python code that receives a start and end value from the user and prints all the numbers between these values ​​(including the end value) on the screen. +a = int(input("Write a number: ")) +b = int(input("Write one more number:")) +if a= second and first>third: + print (first," is the largest number" ) + +elif second > first and second> third: + print (second, " is the largest number ") + +else: + print (f"{third} is the largest number") + +#Hackerrank 3.Question +#The included code stub will read an integer, , from STDIN. +#Without using any string methods, try to print the following: +#Note that "" represents the consecutive values in between. +#Print the list of integers from through as a string, without spaces. +#Sample Input 3 +#Sample Output 123 +#straints 1<= n<=150 + +number= int(input("write a number:")) +while number<1 or number>150: + number= int(input("write a number:")) +for i in range(1, number+1): + print (i, end="")