+ 1

Hello ! When I use to code, the code playground isn't interactive.. As my "inputs" are empty. How can I solve that?

26th Jun 2018, 2:41 AM
Hyp3r60l1c
Hyp3r60l1c - avatar
5 Respuestas
+ 1
Nahum Maurice The error exists in your while loop: while x >= 5: name_user = input("Hello, please insert your name: ") print("Hello", name_user ) age_user = int(input("Please, insert your age: ")) list_users_name.append(name_user ) list_users_age.append(age) x +=1 Firstly, the while asks if x is more than 5, it should be less. while x >= 5 should be while x <= 5 Secondly, you use an unknown variable for age. list_users_age.append(age) should be list_users_age.append(age_user) New while loop code is: while x <= 5: name_user = input("Hello, please insert your name: ") print("Hello", name_user ) age_user = int(input("Please, insert your age: ")) list_users_name.append(name_user ) list_users_age.append(age_user) x +=1 Similarly, your inputs should be: Bob 27 Sherry 23 Harrold 56 Susan 19 Jack 32 Mary 39 Hope this helps https://code.sololearn.com/c8K0xL7Mamvr/?ref=app
26th Jun 2018, 2:09 PM
Andre Daniel
Andre Daniel - avatar
+ 2
Thank you so very much. This helps a lot
26th Jun 2018, 2:19 PM
Hyp3r60l1c
Hyp3r60l1c - avatar
+ 1
Use a new line for each input you're expected to receive.
26th Jun 2018, 4:22 AM
Andre Daniel
Andre Daniel - avatar
+ 1
Hello, thx Rosy and thx Andre Daniel.. Let me show you my code : https://code.sololearn.com/c5L7vTJ99jt0/?ref=app I want to know what is wrong with that.. Thx in advance.
26th Jun 2018, 12:24 PM
Hyp3r60l1c
Hyp3r60l1c - avatar