0

Print the personal details of a student python program coding

Please help

16th Sep 2021, 1:03 PM
Siva Shankar
5 Réponses
+ 4
Siva Shankar , without a clear description of your problem we can not help you. the code is working, the output could be optimized. but starting with giving you some hints does not make sense at the moment. thanks!
16th Sep 2021, 3:23 PM
Lothar
Lothar - avatar
+ 2
Hi, please link your code so we can help you!
16th Sep 2021, 1:29 PM
Lisa
Lisa - avatar
+ 1
You could use so-called f-strings. Example: x = "Hello World" print(f"This is text: {x}") Notice the f before the string and the curly brackets that contain the variable name Edit: Remember that in sololearn you have to provide all input in the one input window (separated by line break)
16th Sep 2021, 1:33 PM
Lisa
Lisa - avatar
0
Rno=str(input('Enter your Register Number:')) Name=str(input('Enter your Full Name :')) Address=str(input('Enter your Address:')) Qualification=str(input('Enter your Qualification:')) print("\n\nResult") print("Roll No\t\t\t=\t",Rno) print("Name\t\t\t=\t",Name) print("Address\t\t\t=\t",Address) print("Qualification\t =\t",Qualification) correction coding please help me
16th Sep 2021, 1:30 PM
Siva Shankar
0
Siva Shankar one thing I see wrong with your code example is when doing input you don't need to identify strings if you just use the word " input() as it is already a string " input() not str(input()) unless you identifying a number or a float eg x = int(input() or 42 ) #integer or y = float(input() or 3.14159 ) #float regular use of z = input() #string Second thing I see is the use of tab or \t which I'm not sure why you are using it here. Just a simple whitespace should be fine. Also using Lisa 's format works using the f string print(f"label: {name of variable}") Hope this helps clarify types of inputs Yes agree with Lothar without a clear description it does make troubleshooting a bit unclear.
16th Sep 2021, 4:31 PM
BroFar
BroFar - avatar