<jupyter_start><jupyter_text>**Class Challenges (Set One)** **Fundamentals ** 1)Ask for the user’s first name and display the output messageHello [First Name] .<jupyter_code>first_name = input('What is your first name? ')
print('Hello ' + first_name + '!')<jupyter_output><empty_output><jupyter_text>2)Ask for the user’s first name and then ask for their surname and display the output messageHello [First Name] [Surname].<jupyter_code>first_name = input('What is your first name? ')
sur_name = input('What is your surname name? ')
print(first_name +' '+ sur_name)<jupyter_output><empty_output><jupyter_text>3)Write code that will display the joke “What do you call a bear with no teeth?” and on the next line display the answer “A gummy bear!” Try to create it using only one line of code.<jupyter_code>print('What do you call a bear with no teeth? \n\nA gummy bear!' )<jupyter_output>What do you call a bear with no teeth? 

A gummy bear!<jupyter_text>4)Ask the user to enter two numbers. Add them together and display the answer asThe total is [answer].<jupyter_code>x = int(input('Enter the 1st number: '))
y = int(input('Enter the 2nd number: '))
answer = x + y
print('The answer as the total is: ',answer)<jupyter_output><empty_output><jupyter_text>5)Ask the user to enter three numbers. Add together the first two numbers and then multiply this total by the third. Display the answer as The answer is[answer].<jupyter_code>x = int(input('Enter the 1st number: '))
y = int(input('Enter the 2nd number: '))
z = int(input('Enter the 3rd number: '))

add_two_first = x + y
print('The sum of the two first numbers is: ',add_two_first)

prod_wth_third = z * add_two_first
print('The answer as the total is: ',prod_wth_third)<jupyter_output><empty_output><jupyter_text>6) Ask how many slices of pizza the user started with and ask how many slicesthey have eaten.Work out how many slices they have left and display the answer in a user friendlyformat.<jupyter_code>strted = int(input('How many slices you started with? '))
eaten = int(input('How many slices you ate? '))
print('You only left me ', strted-eaten,'\U0001F620?')<jupyter_output>How many slices you started with? 66
How many slices you ate? 55
You only left me  11 😠?<jupyter_text>7)Ask the user for their name and their age. Add 1 to their age and display the output [Name] next birthday youwill be [new age].<jupyter_code>Name = input('What is your name? ')
age = int(input('What is your age? '))
age += 1
print(Name + ',', 'you will be ',age, ' years old at your next birthday.')<jupyter_output>What is your name? abe
What is your age? 3
abe, you will be  4  years old at your next birthday.<jupyter_text>8) Ask for the total price of the bill, then ask how many diners there are. Divide the total bill by the number of diners and show how much eacha person must pay.<jupyter_code>bill = float(input('What is the total price of then dinner? '))
dinners = int(input('How many dinners are there? '))
print('Everyone should pay ',round(bill/dinners,2), 'dollars. :)')<jupyter_output>What is the total price of then dinner? 546
How many dinners are there? 55
Everyone should pay  9.93 dollars. :)<jupyter_text>9)Write a program that will ask for a number of days and then will show how many hours, minutes and seconds are in that number of days.<jupyter_code>days = int(input('What is the number of days? '))
print('In', days, 'days, we have', (24*days), 'hours :', (1440*days), 'minutes :', (86400*days), 'seconds.')<jupyter_output><empty_output><jupyter_text>10)There are 2,204 pounds in a kilogram. Ask the user to enter a weight in kilograms and convert it to pounds.<jupyter_code>weight_kg = input('What the weight in kilogram (kg)? ')
weight_lbs = float(weight_kg)*2.204

print('The weight in pound is', round(weight_lbs,2),'lbs.')<jupyter_output>What the weight in kilogram (kg)? 70
The weight in pound is 154.28 lbs.<jupyter_text>11) Task the user to enter a number over 100 and then enter a number under 10 and tell them how many times the smaller number goes into the larger number in a user-friendly format.<jupyter_code>Big_num = float(input('Enter a number over 100: '))
Small_num = float(input('My number (smaller than 10): '))

print('The number',Small_num,'goes',Big_num//Small_num,'times into',Big_num,'- with a remainder of',Big_num%Small_num,'.')<jupyter_output>Enter a number over 100: 500
My number (smaller than 10): 9
The number 9.0 goes 55.0 times into 500.0 - with a remainder of 5.0 .<jupyter_text>Class Challenge (Set 2) If Statements  1)Ask for two numbers. Ifthe first one is largerthan the second, displaythe second number firstand then the firstnumber, otherwise showthe first number first andthen the second.<jupyter_code>num1 = int(input('What is the first number? '))
num2 = int(input('What is the second number? '))

if (num1 > num2):
  print('The second number',num2,'comes first.\nThe first number',num1,'comes after.')
else:
  if (num1 == num2):
    print('The numbers are equal.')
  else:
    print('The first number',num1,'comes first.\nThe second number',num2,'comes after.')<jupyter_output><empty_output><jupyter_text>2) Ask the user to enter anumber that is under 20. If they enter anumber that is 20 ormore, display themessage “Too high”,otherwise display“Thank you”.<jupyter_code>n = int(input('Enter a number that is under 20: '))

if (n >= 20):
  print('Too high!!!')
else:
  print('Thank you.')<jupyter_output><empty_output><jupyter_text>3) Ask the user to enter anumber between 10 and 20(inclusive). If they enter anumber within this range,display the message “Thankyou”, otherwise display themessage “Incorrect answer"<jupyter_code>N = int(input('Enter a number that is between 10 and 20 (inclusive): '))

if (N >= 10 and N <= 20):
  print('Thank you.')
else:
  print('Incorrect answer.')<jupyter_output><empty_output><jupyter_text>4) Ask the user to enter their favourite colour. If they enter “red”, “RED” or“Red” display the message “I like red too”, otherwise display the message“I don’t like [colour], I prefer red”.<jupyter_code>color = input('What is your favorite color? ')

if (color == 'RED' or color == 'Red' or color == 'red'):
  print('I like red too.\U0001F44C')
else:
  print('I don’t like ' + color + ' \U0001F44E, I prefer red.')<jupyter_output>What is your favorite color? PINK
I don’t like PINK 👎, I prefer red.<jupyter_text>5) Ask the user if it is raining and convert their answer to lower caseso it doesn’t matter what case they type it in. If they answer “yes”,ask if it is windy. If they answer “yes” to this second question,display the answer “It is too windy for an umbrella”, otherwisedisplay the message “Take an umbrella”. If they did not answer yesto the first question, display the answer “Enjoy your day”.<jupyter_code>weather1 = str(input('Is it raining \U0001F4A6? '))

if (weather1.lower() == 'yes'):
  weather2 = str(input('Is it windy? '))
  if (weather2.lower() == 'yes'):
    print('It is too windy for an umbrella.')
  else:
    print('Take an umbrella!')
else:
  print('Enjoy your day.')<jupyter_output>Is it raining 💦? no
Enjoy your day.<jupyter_text>6) Ask the user’s age. If theyare 18 or over, display themessage “You can vote”, ifthey are aged 17, display themessage “You can learn todrive”, if they are 16, displaythe message “You can buy alottery ticket”, if they areunder 16, display themessage “You can go Trickor-Treating”.<jupyter_code>age = int (input("How old are you? "))

if (age >= 18):
  citizen = input("Are you a citizen (yes / no)? ")
  if (citizen == "yes"):
    print ("You can vote.")
  else:
    print ("Only the citizens who are 18 and older can vote.")

elif (age == 17):
    print ("You can learn to drive.")

elif (age == 16):
    print ("You can buy a lottery ticket.")

else:
    print ("You can go Trickor- Treating.")<jupyter_output><empty_output><jupyter_text>7) Ask the user to enter a number. If it is under 10,display the message “Too low”, if their number isbetween 10 and 20, display “Correct”, otherwisedisplay “Too high”.<jupyter_code>numb = int (input("Enter a number: "))

if (numb < 10):
  print ("Too low.")

elif (numb >= 10) and (numb <= 20):
  print ("Correct.")

else:
    print ("Too high.")<jupyter_output>Enter a number: 5
Too low.<jupyter_text>8) Ask the user to enter 1, 2 or 3. If they enter a 1, displaythe message “Thank you”, if they enter a 2, display“Well done”, if they enter a 3, display “Correct”. Ifthey enter anything else, display “Error message”.<jupyter_code>Numb = int (input("Enter a number 1, 2, or 3: "))

if (Numb == 1):
  print ("Thank you.")

elif (Numb == 2):
  print ("Well done.")

elif (Numb == 3):
  print ("Correct.")

else:
    print ("Error!!!\nYou should enter 1, 2, or 3.")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11753261615930419, 'fraction_numerical': 0.02357518883039597, 'mean_word_length': 4.95299727520436, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '19', 'dir': 'jupyter-structured-clean-dedup', 'id': '520105', 'license': 'MIT', 'n_tokens_mistral': 3010, 'n_tokens_neox': 2792, 'n_words': 1151, 'path': 'python_hw/Lecture1_Kura.ipynb', 'repo_name': 'ibrahima1289/kura-labs-academy', 'size': '8738'}