You must be logged in to access this section.
Login/Sign uplet msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error' alert(msg)This answer is only visible to premium members
This answer is only visible to premium members
<table border="1">
<tr>
<th>Name</th>
<th>City</th>
<th>Age</th>
</tr>
<tr><td>امیرحسین</td><td>تهران</td><td>23</td></tr>
<tr><td>هوشنگ</td><td>تهران</td><td>48</td></tr>
<tr><td>لیلا</td><td>اراک</td><td>39</td></tr>
<tr><td>مهدی</td><td>قم</td><td>12</td></tr>
<tr><td>زهرا</td><td>مازندران</td><td>33</td></tr>
<tr><td>حسین</td><td>همدان</td><td>56</td></tr>
</table>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="kam.css">
<style>
*{
margin: 0%;padding: 0%;box-sizing: border-box;
}
th,td{
border: 1px solid black;width: 100px;text-align: center;
}
th{
background-color: rgb(253, 92, 18);
}
td{
background-color: rgb(252, 242, 158);
}
</style>
</head>
<body>
<table style="border-collapse: collapse;">
<tr>
<th>اسم</th>
<th>شهر</th>
<th>سن</th>
</tr>
<tr>
<td>امیرحسین</td>
<td>تهران</td>
<td>23</td>
</tr>
<tr>
<td>هوشنگ</td>
<td>تهران</td>
<td>48</td>
</tr>
<tr>
<td>لیلا</td>
<td>اراک</td>
<td>39</td>
</tr>
<tr>
<td>مهدی</td>
<td>قم</td>
<td>12</td>
</tr>
<tr>
<td>زهرا</td>
<td>مازندران</td>
<td>33</td>
</tr>
<tr>
<td>حسین</td>
<td>همدان</td>
<td>56</td>
</tr>
</table>
</body>
</html>
person = [
{
"name": "amir hosein" , "city": "tehran" , "age": 23
},{
"name": "hooshang" , "city": "tehran" , "age": 48
},{
"name": "leyla" , "city": "arak" , "age": 39
},{
"name": "mehdi" , "city": "qome" , "age": 12
},{
"name": "zahra" , "city": "mazandaran" , "age": 33
},{
"name": "hosein" , "city": "hamedan" , "age": 56
},{
"name": "arman" , "city": "amirkola" , "age": 24
},{
"name": "iman" , "city": "sari" , "age": 38
}
]
print(person[0]["name"])
print(person[1]["name"])
print(person[2]["name"])
import pandas as pd
# Data
data = {
'اسم': ['امیرحسین', 'هوشنگ', 'لیلا', 'مهدی', 'زهرا', 'حسین'],
'شهر': ['تهران', 'تهران', 'اراک', 'قم', 'مازندران', 'همدان'],
'سن': [23, 48, 39, 12, 33, 56]
}
# Create Dataframe
df = pd.DataFrame(data)
# Display the table
print(df)
names['حسین','زهرا','مهدی','لیلا','هوشنگ','امیرحسین']
city=['همدان','مازندران','قم','اراک','تهران','تهران']
sen=[23,48,39,12,33,56]
i=0
while i<len(names):
print(names[i],sen[i],city[i],end=' ')
i+=1
print('')
name=["امیرحسین","هوشنگ","لیلا","مهدی","زهرا","حسین"]
city=["تهران","تهران","اراک","قم","مازندران","همدان"]
age=[23,48,39,12,33,56]
for i in range(len(name)):
print(name[i],city[i],age[i])
<!DOCTYPE html>
<html lang="fa">
<head>
<title> جدول</title>
<style>
table{
background-color: bisque;
margin-left: auto;
margin-right: auto;
text-align: center;
border: 2px solid #000000;
padding: 3px;
border-radius: 10px;
}
td{
background-color: azure;
border: 1px solid #000000;
padding: 4px;
border-radius: 10px;
width: 50px;
}
</style>
</head>
<body>
<table >
<tr>
<th>name</th>
<th>city</th>
<th>age</th>
</tr>
<tr>
<td>امیرحسین</td>
<td>تهران</td>
<td>23</td>
</tr>
<tr>
<td>هوشنگ</td>
<td>تهران</td>
<td>48</td>
</tr>
<tr>
<td>لیلا</td>
<td>اراک</td>
<td>39</td>
</tr>
<tr>
<td>مهدی</td>
<td>قم</td>
<td>12</td>
</tr>
<tr>
<td>زهرا</td>
<td>مازندران</td>
<td>33</td>
</tr>
<tr>
<td>حسین</td>
<td>همدان</td>
<td>56</td>
</tr>
</table>
</body>
</html>
Submitting answers is currently unavailable.
You must be logged in to access this section.
Login/Sign up If you don’t understand the exercise or can’t solve it for any reason, that’s completely
normal—don’t worry 😊
Try checking out easier exercises and reviewing different answers
submitted by others. Gradually, you can move on to more challenging exercises. Also, your answer
might be correct even if it’s different from others.